Commit 1d8ee783 authored by 王晓旭's avatar 王晓旭
parents 7d665069 24b159bf
...@@ -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);
} }
} }
} }
......
...@@ -119,7 +119,6 @@ public class MettingRecordServiceImpl extends AbstractCRUDServiceImpl<MettingRec ...@@ -119,7 +119,6 @@ public class MettingRecordServiceImpl extends AbstractCRUDServiceImpl<MettingRec
protected void saveBefore(MettingRecordEntity entity, Context context) throws AppException { protected void saveBefore(MettingRecordEntity entity, Context context) throws AppException {
super.saveBefore(entity, context); super.saveBefore(entity, context);
checkStartAndEndTime(entity); checkStartAndEndTime(entity);
Boolean bool = checkExistStartMeetTime(entity); Boolean bool = checkExistStartMeetTime(entity);
if (bool) { if (bool) {
throw new AppException("当前会议室该时段已经存在等待或进行中的会议,请选择其它时间段!"); throw new AppException("当前会议室该时段已经存在等待或进行中的会议,请选择其它时间段!");
...@@ -134,17 +133,17 @@ public class MettingRecordServiceImpl extends AbstractCRUDServiceImpl<MettingRec ...@@ -134,17 +133,17 @@ public class MettingRecordServiceImpl extends AbstractCRUDServiceImpl<MettingRec
boolean in = DateUtil.isIn(new Date(), entity.getMeetTimeStart(), entity.getMeetTimeEnd()); boolean in = DateUtil.isIn(new Date(), entity.getMeetTimeStart(), entity.getMeetTimeEnd());
if (in) { if (in) {
entity.setMeetStatus(MeetStatusEnum.进行中.getValue()); entity.setMeetStatus(MeetStatusEnum.进行中.getValue());
//发送推送通知 }
RoomDeviceQuery roomDeviceQuery = new RoomDeviceQuery(); //发送推送通知
roomDeviceQuery.setRoomId(entity.getRoomId()); RoomDeviceQuery roomDeviceQuery = new RoomDeviceQuery();
RoomDeviceEntity roomDeviceEntity = roomDeviceService.selectOne(roomDeviceQuery); roomDeviceQuery.setRoomId(entity.getRoomId());
if (!ObjectUtils.isEmpty(roomDeviceEntity)) { RoomDeviceEntity roomDeviceEntity = roomDeviceService.selectOne(roomDeviceQuery);
UploadDeviceReq uploadDeviceReq = new UploadDeviceReq(); if (!ObjectUtils.isEmpty(roomDeviceEntity)) {
uploadDeviceReq.setDeviceCodeList(Arrays.asList(roomDeviceEntity.getDeviceCode())); UploadDeviceReq uploadDeviceReq = new UploadDeviceReq();
uploadDeviceReq.setAction("refreshMetting"); uploadDeviceReq.setDeviceCodeList(Arrays.asList(roomDeviceEntity.getDeviceCode()));
log.info("refreshMetting send deviceList :{}", JSON.toJSONString(Arrays.asList(roomDeviceEntity.getDeviceCode()))); uploadDeviceReq.setAction("refreshMetting");
messageFeign.downMsg(uploadDeviceReq); log.info("refreshMetting send deviceList :{}", JSON.toJSONString(Arrays.asList(roomDeviceEntity.getDeviceCode())));
} messageFeign.downMsg(uploadDeviceReq);
} }
} }
......
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