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

Loading…
Cancel
Save