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

解决设备下发消息

parent 166741d4
......@@ -77,7 +77,6 @@ import java.util.stream.Collectors;
import static com.mortals.xhx.common.key.Constant.*;
import static com.mortals.xhx.common.key.ErrorCode.*;
import static com.mortals.xhx.common.key.RedisKey.KEY_DEVICE_DOWN_MSG_QUEUE;
import static com.mortals.xhx.common.key.RedisKey.KEY_TOKEN_API_CACHE;
/**
......@@ -669,11 +668,11 @@ public class DeviceApiController {
rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue());
try {
List<DeviceMsgReq> collect = list.stream().sorted(Comparator.comparing(DeviceMsgReq::getTimestamp)).collect(Collectors.toList());
collect.forEach(item->{
/* collect.forEach(item->{
cacheService.lpush(KEY_DEVICE_DOWN_MSG_QUEUE,item);
});
// DownMsgTask downMsgTask = new DownMsgTask(list, platformService, productService, deviceService, deviceLogService, messageProducer);
// sendTaskThreadPool.execute(downMsgTask);
});*/
DownMsgTask downMsgTask = new DownMsgTask(list, platformService, productService, deviceService, deviceLogService, messageProducer);
sendTaskThreadPool.execute(downMsgTask);
} catch (AppException e) {
log.error("接收数据失败", e);
rsp.setCode(e.getCode());
......
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