diff --git a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/entity/MessagePushRecordEntity.java b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/entity/MessagePushRecordEntity.java index 9d871bd..d39dde7 100644 --- a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/entity/MessagePushRecordEntity.java +++ b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/entity/MessagePushRecordEntity.java @@ -14,6 +14,7 @@ import org.springblade.core.mp.support.SqlCondition; import org.springblade.core.tool.utils.DateUtil; import org.springframework.format.annotation.DateTimeFormat; +import java.time.LocalDate; import java.time.LocalDateTime; @Data @@ -22,6 +23,13 @@ import java.time.LocalDateTime; @EqualsAndHashCode public class MessagePushRecordEntity extends MessageTemplateEntity { + @ApiModelProperty("站点编码") + @QueryField(condition = SqlCondition.EQUAL) + private String stationCode; + + @ApiModelProperty("站点名称") + private String stationName; + @ApiModelProperty("业务任务ID") @QueryField(condition = SqlCondition.EQUAL) private Long taskId; @@ -66,4 +74,16 @@ public class MessagePushRecordEntity extends MessageTemplateEntity { @ApiModelProperty(value = "响应说明") private String respondRemark; + @ApiModelProperty("查询开始时间") + @DateTimeFormat(pattern = DateUtil.PATTERN_DATE) + @JsonFormat(pattern = DateUtil.PATTERN_DATE) + @TableField(exist = false) + private LocalDate startTime; + + @ApiModelProperty("查询结束时间") + @DateTimeFormat(pattern = DateUtil.PATTERN_DATE) + @JsonFormat(pattern = DateUtil.PATTERN_DATE) + @TableField(exist = false) + private LocalDate endTime; + } diff --git a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/entity/config/MessageTemplateEntity.java b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/entity/config/MessageTemplateEntity.java index 3da5a62..93f5930 100644 --- a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/entity/config/MessageTemplateEntity.java +++ b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/entity/config/MessageTemplateEntity.java @@ -1,5 +1,6 @@ package com.hnac.hzims.message.entity.config; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -51,4 +52,8 @@ public class MessageTemplateEntity extends TenantEntity implements Serializable @QueryField(condition = SqlCondition.EQUAL) private String advanceTimeUnit; + @TableField(exist = false) + @ApiModelProperty(value = "创建人名称") + private String creatorName; + } diff --git a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageClient.java b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageClient.java index 76fbea8..1faa7cd 100644 --- a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageClient.java +++ b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IMessageClient.java @@ -3,6 +3,7 @@ package com.hnac.hzims.message.fegin; import com.hnac.hzims.message.MessageConstants; import com.hnac.hzims.message.dto.PushDto; import com.hnac.hzims.message.dto.SmsPushDto; +import com.hnac.hzims.message.entity.MessagePushRecordEntity; import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PostMapping; @@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestBody; public interface IMessageClient { String API_PREFIX = "/feign/message"; String SEND_SMS_MESSAGE = API_PREFIX + "/send-sms-message"; + String SEND_MESSAGE = API_PREFIX + "/sendMessage"; /** * 推送消息(短信) * @param pushDto @@ -25,4 +27,7 @@ public interface IMessageClient { */ @PostMapping(SEND_SMS_MESSAGE) R sendSmsMessage(SmsPushDto pushDto); + + @PostMapping(SEND_MESSAGE) + R sendMessage(@RequestBody MessagePushRecordEntity request); } diff --git a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/MessageClientFallback.java b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/MessageClientFallback.java index 9a393a3..0c6058a 100644 --- a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/MessageClientFallback.java +++ b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/MessageClientFallback.java @@ -2,6 +2,7 @@ package com.hnac.hzims.message.fegin; import com.hnac.hzims.message.dto.PushDto; import com.hnac.hzims.message.dto.SmsPushDto; +import com.hnac.hzims.message.entity.MessagePushRecordEntity; import org.springblade.core.tool.api.R; import org.springframework.stereotype.Component; @@ -15,4 +16,9 @@ public class MessageClientFallback implements IMessageClient { public R sendSmsMessage(SmsPushDto pushDto) { return R.fail("推送失败"); } + + @Override + public R sendMessage(MessagePushRecordEntity request) { + return R.fail("推送失败"); + } }