Commit 67e35c69 authored by 赵啸非's avatar 赵啸非

修改配置文件

parent bc254467
...@@ -256,12 +256,12 @@ public class DeviceApiController { ...@@ -256,12 +256,12 @@ public class DeviceApiController {
SendThirdPartyTask sendThirdPartyTask = new SendThirdPartyTask(deviceEntity, productEntity, platformEntity, deviceService); SendThirdPartyTask sendThirdPartyTask = new SendThirdPartyTask(deviceEntity, productEntity, platformEntity, deviceService);
sendTaskThreadPool.execute(sendThirdPartyTask); sendTaskThreadPool.execute(sendThirdPartyTask);
} catch (AppException e) { } catch (AppException e) {
log.error("接收数据失败", e); //log.error("接收数据失败", e);
rsp.setCode(e.getCode()); rsp.setCode(e.getCode());
rsp.setMsg(e.getMessage()); rsp.setMsg(e.getMessage());
return JSON.toJSONString(rsp); return JSON.toJSONString(rsp);
} catch (Exception e) { } catch (Exception e) {
log.error("接收数据失败", e); log.error("接收数据异常", e);
rsp.setCode(ApiRespCodeEnum.FAILED.getValue()); rsp.setCode(ApiRespCodeEnum.FAILED.getValue());
rsp.setMsg(e.getMessage()); rsp.setMsg(e.getMessage());
return JSON.toJSONString(rsp); return JSON.toJSONString(rsp);
......
...@@ -30,7 +30,7 @@ public class AlarmSmsSendController extends BaseCRUDJsonBodyMappingController<Al ...@@ -30,7 +30,7 @@ public class AlarmSmsSendController extends BaseCRUDJsonBodyMappingController<Al
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "sendStatus", paramService.getParamBySecondOrganize("AlarmSmsSend","sendStatus")); this.addDict(model, "sendStatus", paramService.getParamBySecondOrganize("AlarmSmsSend","sendStatus"));
super.init(model, context); super.init(model, context);
} }
......
...@@ -27,8 +27,6 @@ public class DeviceVo extends BaseEntityLong { ...@@ -27,8 +27,6 @@ public class DeviceVo extends BaseEntityLong {
private String platformCode; private String platformCode;
/** /**
* 是否通知第三方 * 是否通知第三方
*/ */
......
...@@ -64,6 +64,9 @@ spring: ...@@ -64,6 +64,9 @@ spring:
exceptiontranslation: exceptiontranslation:
enabled: false enabled: false
datasource: datasource:
druid:
connect-timeout: 30000
socket-timeout: 60000
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
#driver-class-name: com.p6spy.engine.spy.P6SpyDriver #driver-class-name: com.p6spy.engine.spy.P6SpyDriver
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
......
package com.mortals.httpclient; package com.mortals.httpclient;
import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/** /**
* @author: zxfei * @author: zxfei
...@@ -18,5 +26,61 @@ public class Test { ...@@ -18,5 +26,61 @@ public class Test {
// byte[] result = clipher.doFinal(plainText.getBytes()); // byte[] result = clipher.doFinal(plainText.getBytes());
// System.out.println(Base64.encodeBase64URLSafeString(result)); // System.out.println(Base64.encodeBase64URLSafeString(result));
String sql = "";
ArrayList<Map<String, String>> deviceList = new ArrayList<>();
HashMap<String, String> map = new HashMap<>();
map.put("排队机", "C0-FB-F9-CD-3B-A4");
deviceList.add(map);
map = new HashMap<>();
map.put("评价器", "0c-cf-89-09-d1-c8");
deviceList.add(map);
map = new HashMap<>();
map.put("集中显示屏", "5E-93-5B-4B-94-67");
deviceList.add(map);
map = new HashMap<>();
map.put("呼叫器", "0c-cf-89-42-8e-b8");
deviceList.add(map);
map = new HashMap<>();
map.put("呼叫器", "a0-9f-10-5a-aa-44");
deviceList.add(map);
map = new HashMap<>();
map.put("窗口屏", "18-9F-BC-EE-E0-87");
deviceList.add(map);
map = new HashMap<>();
map.put("会议室电子门牌", "2A-9A-30-3A-BD-C6");
deviceList.add(map);
map = new HashMap<>();
map.put("电子门牌", "42-72-FF-54-87-8D");
deviceList.add(map);
map = new HashMap<>();
map.put("信息发布屏", "30-1F-9A-62-5E-D7");
deviceList.add(map);
for (int i = 0; i < 300; i++) {
int randomDeviceInt = RandomUtil.randomInt(0, deviceList.size());
Map<String, String> deviceMap = deviceList.get(randomDeviceInt);
deviceMap.entrySet().stream().forEach(item -> {
String format = String.format("【设备】当前%s设备,编码%s离线,请注意!", item.getKey(), item.getValue());
String dateStr = DateUtil.formatDateTime(RandomUtil.randomDate(DateUtil.offsetDay(new Date(),-4), DateField.HOUR, 1, 100).toJdkDate());
String insertsql = String.format("INSERT INTO `mortals_xhx_alarm_sms_send`(`id`, `mobile`, `receiver`, `sendMess`, `sendStatus`, `sendTime`, `siteId`, `createTime`, `updateUserId`, `updateTime`) VALUES (null, '13808095770', '文浩臣', '%s', 2, '%s', 1, '%s', NULL, NULL);", format, dateStr, dateStr);
System.out.println(insertsql);
});
}
} }
} }
...@@ -14,14 +14,14 @@ client.global.set("authToken", JSON.parse(response.body).data.token); ...@@ -14,14 +14,14 @@ client.global.set("authToken", JSON.parse(response.body).data.token);
%} %}
###设备统计列表 ###设备统计列表
POST {{baseUrl}}/device/stat/list POST {{baseUrl}}/device/stat/interlist
Content-Type: application/json Content-Type: application/json
{ {
"page":1, "page":1,
"size":10, "size":10,
"siteId": 1, "siteId": 1,
"selected": 4 "selected": 1
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment