Commit 688cd148 authored by 赵啸非's avatar 赵啸非

优化设备管理系统callback 下发消息效率

parent e2e31b6d
......@@ -668,7 +668,9 @@ public class DeviceApiController {
rsp.setCode(ApiRespCodeEnum.SUCCESS.getValue());
try {
List<DeviceMsgReq> collect = list.stream().sorted(Comparator.comparing(DeviceMsgReq::getTimestamp)).collect(Collectors.toList());
cacheService.lpush(KEY_DEVICE_DOWN_MSG_QUEUE,collect);
collect.forEach(item->{
cacheService.lpush(KEY_DEVICE_DOWN_MSG_QUEUE,item);
});
// DownMsgTask downMsgTask = new DownMsgTask(list, platformService, productService, deviceService, deviceLogService, messageProducer);
// sendTaskThreadPool.execute(downMsgTask);
} catch (AppException e) {
......
......@@ -24,6 +24,14 @@ Content-Type: application/json
{}
###首页
POST {{baseUrl}}//api/callback
Authorization: {{authToken}}
Content-Type: application/json
[{"deviceCode":"26-55-E7-3F-B1-AF","messageType":"waitqueue","timestamp":"1699428063250","data":"W10="}]
###站点树
GET {{baseUrl}}/site/siteTree
Authorization: {{authToken}}
......
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