Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 9 months ago
parent
commit
603047935f
  1. 1
      hzims-service/message/src/main/java/com/hnac/hzims/message/schedule/MessagePushSchedule.java
  2. 7
      hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/MessagePushRecordServiceImpl.java

1
hzims-service/message/src/main/java/com/hnac/hzims/message/schedule/MessagePushSchedule.java

@ -115,6 +115,7 @@ public class MessagePushSchedule {
}
else {
updateWrapper.set(MessagePushRecordEntity::getStatus, MessageConstants.PUSH_SUCCESS);
updateWrapper.set(MessagePushRecordEntity::getPushTime, LocalDateTime.now());
}
updateWrapper.set(MessagePushRecordEntity::getFaultResult,faultResult);
recordService.update(updateWrapper);

7
hzims-service/message/src/main/java/com/hnac/hzims/message/service/impl/MessagePushRecordServiceImpl.java

@ -353,11 +353,7 @@ public class MessagePushRecordServiceImpl extends BaseServiceImpl<MessagePushRec
this.updateById(record);
}
else {
if(pushService.send(record)) {
record.setStatus(MessageConstants.PUSH_SUCCESS);
record.setPushTime(LocalDateTime.now());
}
else {
if(!pushService.send(record)) {
record.setStatus(MessageConstants.PUSH_FAILED);
}
}
@ -413,7 +409,6 @@ public class MessagePushRecordServiceImpl extends BaseServiceImpl<MessagePushRec
if(MessageConstants.APP_PUSH.equals(record.getType())) {
// APP消息存入redis中进行消费
this.sendAppImmediatelyMsg(record,request.isEmergent());
redisTemplate.opsForList().leftPush(appPushRedisKey.concat(":").concat(record.getPusher()), record);
} else if (MessageConstants.WS_PUSH.equals(record.getType())) {
// WEB消息调用接口直接进行推送
if(wsMessageService.send(record)) {

Loading…
Cancel
Save