微调
This commit is contained in:
@@ -14,7 +14,6 @@ import com.njcn.access.enums.TypeEnum;
|
||||
import com.njcn.access.pojo.RspDataDto;
|
||||
import com.njcn.access.pojo.dto.*;
|
||||
import com.njcn.access.pojo.dto.file.FileDto;
|
||||
import com.njcn.access.pojo.dto.heart.HeartBeatDto;
|
||||
import com.njcn.access.pojo.param.ReqAndResParam;
|
||||
import com.njcn.access.pojo.po.CsDeviceOnlineLogs;
|
||||
import com.njcn.access.pojo.po.CsLineModel;
|
||||
@@ -383,15 +382,15 @@ public class MqttMessageHandler {
|
||||
csEquipmentDeliveryService.updateRunStatusBynDid(nDid,AccessEnum.ONLINE.getCode());
|
||||
//处理心跳
|
||||
ReqAndResDto.Res reqAndResParam = new ReqAndResDto.Res();
|
||||
HeartBeatDto heartBeatDto = new HeartBeatDto();
|
||||
//fixme 前置处理的时间应该是UTC时间,所以需要加8小时。
|
||||
heartBeatDto.setTime(System.currentTimeMillis()/1000+8*3600);
|
||||
reqAndResParam.setMid(res.getMid());
|
||||
reqAndResParam.setDid(0);
|
||||
reqAndResParam.setPri(AccessEnum.FIRST_CHANNEL.getCode());
|
||||
reqAndResParam.setType(Integer.parseInt(TypeEnum.TYPE_29.getCode()));
|
||||
reqAndResParam.setCode(200);
|
||||
reqAndResParam.setMsg(heartBeatDto);
|
||||
//fixme 前置处理的时间应该是UTC时间,所以需要加8小时。
|
||||
String json = "{Time:\""+(System.currentTimeMillis()/1000+8*3600)+"\"}";
|
||||
net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(json);
|
||||
reqAndResParam.setMsg(jsonObject);
|
||||
publisher.send("/Dev/DataRsp/"+version+"/"+nDid,gson.toJson(reqAndResParam),1,false);
|
||||
//处理业务逻辑
|
||||
Object object = res.getMsg();
|
||||
|
||||
Reference in New Issue
Block a user