Commit be9eca1d authored by 赵啸非's avatar 赵啸非

设备列表导出优化

parent 2adadaf6
......@@ -156,6 +156,7 @@ public class DeviceApiController {
deviceInfo.setProductId(productEntity.getId());
deviceInfo.setProductName(productEntity.getProductName());
deviceInfo.setEnabled(deviceEntity.getEnabled());
deviceInfo.setSource(deviceEntity.getSource());
registerResp.setDeviceInfo(deviceInfo);
String content = EncryptUtil.myEnscrt(JSON.toJSONString(registerResp), 9, DES_STR, ENCRYPT_STR);
......@@ -326,8 +327,10 @@ public class DeviceApiController {
deviceService.update(deviceEntity, null);
}
//deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceMethodEnum.ACTIVE);
//deviceService.sendThirdParty(deviceEntity, productEntity, platformEntity, DeviceMethodEnum.ONLINE);
if (deviceEntity.getDeviceStatus() == DeviceStatusEnum.未激活.getValue()) {
throw new AppException(DEVICE_UNACTIVE, DEVICE_UNACTIVE_CONTENT);
}
DeviceQueueAuthInfo authInfo = new DeviceQueueAuthInfo();
authInfo.setHost(host);
authInfo.setPort(port);
......@@ -356,14 +359,9 @@ public class DeviceApiController {
deviceInfo.setProductName(productEntity.getProductName());
deviceInfo.setEnabled(deviceEntity.getEnabled());
deviceInfo.setSource(deviceEntity.getSource());
registerResp.setDeviceInfo(deviceInfo);
String content = EncryptUtil.myEnscrt(JSON.toJSONString(registerResp), 9, DES_STR, ENCRYPT_STR);
log.info("deEncrypt:{}", EncryptUtil.myReEnscrt(content, 9, DES_STR, ENCRYPT_STR));
deviceResp.setContent(content);
rsp.setData(deviceResp);
} catch (AppException e) {
log.error("接收数据失败", e);
......
......@@ -89,7 +89,7 @@ public class DeviceMsgComsumerStartedService implements IApplicationStartedServi
this.consumersExecutor = Executors.newCachedThreadPool(IotThreadFactory.forName("消费queue线程"));
consumersExecutor.submit(() -> {
int waitTime = 1000;
int waitTime = 10;
while (!stopped) {
try {
List<TbQueueMsg> messageList = new ArrayList(32);
......
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