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

修改上下线通知

parent 94b02d89
...@@ -31,6 +31,7 @@ import com.mortals.xhx.busiz.rsp.*; ...@@ -31,6 +31,7 @@ import com.mortals.xhx.busiz.rsp.*;
import com.mortals.xhx.common.code.*; import com.mortals.xhx.common.code.*;
import com.mortals.xhx.common.key.Constant; import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.key.QueueKey; import com.mortals.xhx.common.key.QueueKey;
import com.mortals.xhx.common.key.RedisKey;
import com.mortals.xhx.common.model.DefaultTbQueueMsgHeaders; import com.mortals.xhx.common.model.DefaultTbQueueMsgHeaders;
import com.mortals.xhx.common.model.MessageHeader; import com.mortals.xhx.common.model.MessageHeader;
import com.mortals.xhx.common.pdu.DeviceReq; import com.mortals.xhx.common.pdu.DeviceReq;
...@@ -246,13 +247,14 @@ public class DeviceApiController { ...@@ -246,13 +247,14 @@ public class DeviceApiController {
deviceEntity.setDeviceStatus(DeviceStatusEnum.在线.getValue()); deviceEntity.setDeviceStatus(DeviceStatusEnum.在线.getValue());
deviceEntity.setDeviceVersion(req.getDeviceVersion() == null ? "" : req.getDeviceVersion()); deviceEntity.setDeviceVersion(req.getDeviceVersion() == null ? "" : req.getDeviceVersion());
/* if(deviceEntity.getDeviceStatus()== DeviceStatusEnum.离线.getValue()){ if(deviceEntity.getDeviceStatus()== DeviceStatusEnum.离线.getValue()){
DeviceEntity entity = new DeviceEntity(); DeviceEntity condition = new DeviceEntity();
entity.setId(deviceEntity.getId()); condition.setId(deviceEntity.getId());
entity.setOnlineTime(new Date()); condition.setOnlineTime(new Date());
entity.setDeviceStatus(DeviceStatusEnum.在线.getValue()); condition.setDeviceStatus(DeviceStatusEnum.在线.getValue());
cacheService.lpush(RedisKey.KEY_DEVICE_THIRDPARTY_QUEUE, entity); cacheService.lpush(RedisKey.KEY_DEVICE_THIRDPARTY_QUEUE, condition);
}*/ cacheService.lpush(RedisKey.KEY_DEVICE_UPDATE_QUEUE,condition);
}
// deviceService.getDeviceDao().update(deviceEntity); // deviceService.getDeviceDao().update(deviceEntity);
rsp.setData(deviceResp); rsp.setData(deviceResp);
/* SendThirdPartyTask sendThirdPartyTask = new SendThirdPartyTask(deviceEntity, productEntity, platformEntity, deviceService); /* SendThirdPartyTask sendThirdPartyTask = new SendThirdPartyTask(deviceEntity, productEntity, platformEntity, deviceService);
......
...@@ -65,9 +65,9 @@ public class SendThirdPartyThread extends AbstractThread { ...@@ -65,9 +65,9 @@ public class SendThirdPartyThread extends AbstractThread {
for (DeviceReq deviceMsgReq : deviceMsgReqs) { for (DeviceReq deviceMsgReq : deviceMsgReqs) {
//设备上下线信息 不更新通知 //设备上下线信息 不更新通知
if (DeviceMethodEnum.ONLINE.getValue() == deviceMsgReq.getDeviceStatus() || DeviceMethodEnum.OFFLINE.getValue() == deviceMsgReq.getDeviceStatus()) { /* if (DeviceMethodEnum.ONLINE.getValue() == deviceMsgReq.getDeviceStatus() || DeviceMethodEnum.OFFLINE.getValue() == deviceMsgReq.getDeviceStatus()) {
return; return;
} }*/
//deviceReq.getReceiveMethod() //deviceReq.getReceiveMethod()
String phpInUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_IN_HTTP_URL, "http://127.0.0.1:11078/zwfw_api"); String phpInUrl = GlobalSysInfo.getParamValue(PARAM_SERVER_PHP_IN_HTTP_URL, "http://127.0.0.1:11078/zwfw_api");
ApiResp<String> resp = messageService.sendThirdParty(UrlBuilder.of(phpInUrl).addPath(thirdPartyPath).build(), deviceMsgReq); ApiResp<String> resp = messageService.sendThirdParty(UrlBuilder.of(phpInUrl).addPath(thirdPartyPath).build(), deviceMsgReq);
......
...@@ -36,6 +36,9 @@ ...@@ -36,6 +36,9 @@
"yibin-web": { "yibin-web": {
"baseUrl": "http://112.19.80.237:11091/m" "baseUrl": "http://112.19.80.237:11091/m"
} },
"reg-web": {
"baseUrl": "http://8.136.255.30:1136/m"
}
} }
\ No newline at end of file
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