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

修改通知去重复

parent 4b7ce947
...@@ -41,7 +41,7 @@ import java.util.stream.Collectors; ...@@ -41,7 +41,7 @@ import java.util.stream.Collectors;
* 会议室切换状态 * 会议室切换状态
*/ */
@Slf4j @Slf4j
@Service("MeetSwitchTaskTask") @Service("MeetSwitchTask")
public class MeetSwitchTaskImpl implements ITaskExcuteService { public class MeetSwitchTaskImpl implements ITaskExcuteService {
@Autowired @Autowired
...@@ -113,15 +113,21 @@ public class MeetSwitchTaskImpl implements ITaskExcuteService { ...@@ -113,15 +113,21 @@ public class MeetSwitchTaskImpl implements ITaskExcuteService {
//通知设备进行数据更新 //通知设备进行数据更新
long expire = between * 60 == 0 ? between * 60 : 60; long expire = between * 60 == 0 ? between * 60 : 60;
boolean setnx = cacheService.setnx(RedisKey.KEY_METTING_START_CACHE, recordEntity.getId(), expire); log.info("会议redis 设置过期时间:{}", expire);
if (setnx) { try {
UploadDeviceReq uploadDeviceReq = new UploadDeviceReq(); boolean setnx = cacheService.setnx(RedisKey.KEY_METTING_START_CACHE, recordEntity.getId(), expire);
uploadDeviceReq.setDeviceCodeList(Arrays.asList(roomDeviceEntity.getDeviceCode())); if (setnx) {
uploadDeviceReq.setAction("preMeetStart"); UploadDeviceReq uploadDeviceReq = new UploadDeviceReq();
uploadDeviceReq.setContent(JSON.toJSONString(recordEntity)); uploadDeviceReq.setDeviceCodeList(Arrays.asList(roomDeviceEntity.getDeviceCode()));
log.info("preMeetStart send msg :{}", roomDeviceEntity.getDeviceCode()); uploadDeviceReq.setAction("preMeetStart");
messageFeign.downMsg(uploadDeviceReq); uploadDeviceReq.setContent(JSON.toJSONString(recordEntity));
log.info("preMeetStart send msg :{}", roomDeviceEntity.getDeviceCode());
messageFeign.downMsg(uploadDeviceReq);
}
}catch (Exception e){
log.error("设置异常",e);
} }
} }
} }
......
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