Commit a9e0c841 authored by KeYong's avatar KeYong

优化

parent 5681f2b9
...@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.service.impl; ...@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.aspose.words.Run;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.feign.systemctl.model.MessageModel; import com.yeejoin.amos.feign.systemctl.model.MessageModel;
...@@ -27,6 +28,7 @@ import com.yeejoin.equipmanage.service.*; ...@@ -27,6 +28,7 @@ import com.yeejoin.equipmanage.service.*;
import com.yeejoin.equipmanage.utils.BeanUtil; import com.yeejoin.equipmanage.utils.BeanUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttException;
import org.omg.SendingContext.RunTime;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
...@@ -542,8 +544,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService { ...@@ -542,8 +544,12 @@ public class MqttReceiveServiceImpl implements MqttReceiveService {
ext.put("name", equipmentSpecificIndex.getEquipmentSpecificName()); ext.put("name", equipmentSpecificIndex.getEquipmentSpecificName());
ext.put("time", new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN).format(new Date())); ext.put("time", new SimpleDateFormat(DateUtils.DATE_TIME_PATTERN).format(new Date()));
model.setExtras(ext); model.setExtras(ext);
Token token = remoteSecurityService.getServerToken(); try {
systemctlFeign.create(token.getAppKey(), token.getProduct(), token.getToke(), model); Token token = remoteSecurityService.getServerToken();
systemctlFeign.create(token.getAppKey(), token.getProduct(), token.getToke(), model);
} catch (Exception e) {
log.error("调用平台出错!");
}
log.info(String.format("调用平台消息服务成功:%s", JSON.toJSONString(model))); log.info(String.format("调用平台消息服务成功:%s", JSON.toJSONString(model)));
} }
} }
......
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