diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java index cf754f5..60c442d 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java @@ -83,7 +83,7 @@ public class MaintenanceTaskRemindHandler { request.setCreateUser(taskEntity.getCreateUser()); request.setTenantId(CommonConstant.TENANT_ID); R sendFlag = messageClient.sendAppAndWsMsgByUsers(request); - if(!(sendFlag.isSuccess() && sendFlag.getData())) { + if(!sendFlag.isSuccess() || sendFlag.getData() == null) { XxlJobLogger.log(taskEntity.getId() +"执行人消息推送失败!"); } // 任务执行人发送短信 @@ -92,7 +92,7 @@ public class MaintenanceTaskRemindHandler { request.setUserIds(listR.getData().stream().map(User::getId).map(String::valueOf).collect(Collectors.joining(","))); request.setContent("有一条待执行的日常维护任务【"+taskEntity.getTitle()+"】即将于"+ DateUtil.format(taskEntity.getPlanEndTime(),DateUtil.PATTERN_DATETIME) +"过期,请确认。"); R result = messageClient.sendAppAndWsMsgByUsers(request); - if(!(result.isSuccess() && result.getData())) { + if(!result.isSuccess() || result.getData() == null) { XxlJobLogger.log(taskEntity.getId() +"执行人消息推送失败!"); } }