diff --git a/hzims-service/inspect/pom.xml b/hzims-service/inspect/pom.xml index 9ac3564..3da9278 100644 --- a/hzims-service/inspect/pom.xml +++ b/hzims-service/inspect/pom.xml @@ -13,6 +13,7 @@ com.hnac.hzinfo.inspect hzinfo-inspect + 4.0.0-SNAPSHOT jar diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java index 2bff11e..a09551f 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/controller/MessagePushRecordController.java @@ -70,7 +70,7 @@ public class MessagePushRecordController extends BladeController { @ApiOperationSupport(order = 6) public R readMessage(@PathVariable @ApiParam("消息记录ID") String id) { MessagePushRecordEntity record = messagePushRecordService.getById(id); - if(!record.getPusher().equals(AuthUtil.getUserId())) { + if(!(Long.parseLong(record.getPusher()) == AuthUtil.getUserId())) { return R.fail("当前登录人不是消息推送人,修改状态失败"); } LambdaUpdateWrapper eq = Wrappers.lambdaUpdate() diff --git a/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java b/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java index bf43821..57afdb2 100644 --- a/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java +++ b/hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java @@ -25,6 +25,7 @@ import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.SpringUtil; import org.springblade.system.user.cache.UserCache; +import org.springblade.system.user.entity.User; import org.springframework.util.Assert; import org.springframework.web.bind.annotation.*; @@ -32,6 +33,7 @@ import javax.validation.Valid; import java.time.LocalDateTime; import java.time.ZoneId; import java.util.Arrays; +import java.util.Optional; /** * @author hx @@ -98,7 +100,7 @@ public class MessageClient extends BladeController implements IMessageClient{ entity.setPlanTime(request.getPlanTime()); entity.setPushType(MessageConstants.PLAN); entity.setPusher(request.getReceiver().toString()); - entity.setPusherName(UserCache.getUser(request.getReceiver()).getName()); + entity.setPusherName(Optional.ofNullable(UserCache.getUser(request.getReceiver())).map(User::getName).orElse("")); entity.setAccount(request.getReceiver().toString()); entity.setContent(request.getContent()); entity.setSmsParam(request.getSmsParam());