Commit 27aa673a authored by tangwei's avatar tangwei

修改bug

parent 9f0957e9
package com.yeejoin.equipmanage.fegin; package com.yeejoin.equipmanage.fegin;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig; import com.yeejoin.amos.boot.biz.common.feign.MultipartSupportConfig;
...@@ -29,4 +26,8 @@ public interface SystemctlFeign { ...@@ -29,4 +26,8 @@ public interface SystemctlFeign {
@RequestHeader("token") String token, @RequestHeader("token") String token,
@RequestBody MessageModel model); @RequestBody MessageModel model);
@RequestMapping(value = "/systemctl/v1/message/{sequenceNbr}", method = RequestMethod.PUT, consumes = "application/json")
ResponseModel<MessageModel> updateIsRead(@PathVariable(value = "sequenceNbr") Long sequenceNbr
);
} }
package com.yeejoin.equipmanage.service.impl; package com.yeejoin.equipmanage.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
...@@ -13,10 +14,7 @@ import com.yeejoin.equipmanage.common.entity.*; ...@@ -13,10 +14,7 @@ import com.yeejoin.equipmanage.common.entity.*;
import com.yeejoin.equipmanage.common.entity.dto.AlarmDTO; import com.yeejoin.equipmanage.common.entity.dto.AlarmDTO;
import com.yeejoin.equipmanage.common.entity.dto.EquipSpecificAlarmDTO; import com.yeejoin.equipmanage.common.entity.dto.EquipSpecificAlarmDTO;
import com.yeejoin.equipmanage.common.entity.vo.VideoVO; import com.yeejoin.equipmanage.common.entity.vo.VideoVO;
import com.yeejoin.equipmanage.common.enums.AlarmGridColumnEnum; import com.yeejoin.equipmanage.common.enums.*;
import com.yeejoin.equipmanage.common.enums.AlarmTypeEnum;
import com.yeejoin.equipmanage.common.enums.ConfirmAlamEnum;
import com.yeejoin.equipmanage.common.enums.EquipmentDataEnum;
import com.yeejoin.equipmanage.common.utils.CommonPageInfoParam; import com.yeejoin.equipmanage.common.utils.CommonPageInfoParam;
import com.yeejoin.equipmanage.common.utils.DateUtils; import com.yeejoin.equipmanage.common.utils.DateUtils;
import com.yeejoin.equipmanage.common.utils.StringUtil; import com.yeejoin.equipmanage.common.utils.StringUtil;
...@@ -95,6 +93,9 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -95,6 +93,9 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
@Autowired @Autowired
JcsFeign jcsFeign; JcsFeign jcsFeign;
@Autowired
MqttSendGateway mqttSendGateway;
@Override @Override
public void handleExport(HttpServletResponse response, List<Long> ids, String alarmType) { public void handleExport(HttpServletResponse response, List<Long> ids, String alarmType) {
CommonPageInfoParam param = new CommonPageInfoParam(); CommonPageInfoParam param = new CommonPageInfoParam();
...@@ -796,18 +797,20 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec ...@@ -796,18 +797,20 @@ public class EquipmentSpecificAlarmServiceImpl extends ServiceImpl<EquipmentSpec
MarqueeData marqueeData = marqueeDataMapper.selectById(messageId); MarqueeData marqueeData = marqueeDataMapper.selectById(messageId);
marqueeData.setIsRead(1); marqueeData.setIsRead(1);
int i = marqueeDataMapper.updateById(marqueeData); int i = marqueeDataMapper.updateById(marqueeData);
MessageModel model = new MessageModel(); // MessageModel model = new MessageModel();
model.setMsgType("pressurePump"); // model.setMsgType("pressurePump");
model.setSendTime(new Date()); // model.setSendTime(new Date());
model.setIsSendWeb(true); // model.setIsSendWeb(true);
model.setCategory(1); // model.setCategory(1);
model.setIsSendApp(false); // model.setIsSendApp(false);
model.setTerminal("WEB"); // model.setTerminal("WEB");
Map<String, String> ext = new HashMap<>(); // Map<String, String> ext = new HashMap<>();
ext.put("isRead", "1"); // ext.put("isRead", "1");
model.setExtras(ext); // model.setExtras(ext);
Token token = remoteSecurityService.getServerToken(); Token token = remoteSecurityService.getServerToken();
systemctlFeign.create(token.getAppKey(), token.getProduct(), token.getToke(), model); // systemctlFeign.create(token.getAppKey(), token.getProduct(), token.getToke(), model);
systemctlFeign.updateIsRead(Long.valueOf(messageId));
mqttSendGateway.sendToMqtt("pressurePump", "1");
return i; return i;
} }
} }
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