Browse Source

# 计划类型消息推送接口修改

zhongwei
haungxing 2 years ago
parent
commit
dfddc079dd
  1. 2
      hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/dto/PlanMsgRecordDto.java
  2. 3
      hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java

2
hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/dto/PlanMsgRecordDto.java

@ -59,5 +59,7 @@ public class PlanMsgRecordDto implements Serializable {
@ApiModelProperty("消息推送耳机") @ApiModelProperty("消息推送耳机")
@NotNull @NotNull
private String content; private String content;
@ApiModelProperty("租户ID")
private String tenantId;
} }

3
hzims-service/message/src/main/java/com/hnac/hzims/message/fegin/MessageClient.java

@ -95,6 +95,9 @@ public class MessageClient extends BladeController implements IMessageClient{
entity.setPusherName(UserCache.getUser(request.getReceiver()).getName()); entity.setPusherName(UserCache.getUser(request.getReceiver()).getName());
entity.setAccount(request.getReceiver().toString()); entity.setAccount(request.getReceiver().toString());
entity.setContent(request.getContent()); entity.setContent(request.getContent());
if(Func.isNotEmpty(request.getTenantId())) {
entity.setTenantId(request.getTenantId());
}
Assert.isTrue(recordService.saveAndSend(entity),()-> { Assert.isTrue(recordService.saveAndSend(entity),()-> {
throw new ServiceException("消息保存失败!"); throw new ServiceException("消息保存失败!");
}); });

Loading…
Cancel
Save