Commit 503bdbd7381bc27474a30a85bf994f36ed6e00b1

Authored by 张志伟
1 parent e465cbd2

:zap: 调整参数

README.md
@@ -20,7 +20,8 @@ @@ -20,7 +20,8 @@
20 |参数名|必须|类型|说明| 20 |参数名|必须|类型|说明|
21 |----|:----:|:----:|:----| 21 |----|:----:|:----:|:----|
22 |memberId|是 | Long| 会员id| 22 |memberId|是 | Long| 会员id|
23 -|title| 是 | String| 标题内容。| 23 +|title| 是 | String| 标题|
  24 +|content|是|String|内容|
24 |changeType| 是 | String| 变更类型| 25 |changeType| 是 | String| 变更类型|
25 |changeResult| 是 | String| 变更结果。| 26 |changeResult| 是 | String| 变更结果。|
26 |remark| 否 | String| 备注。| 27 |remark| 否 | String| 备注。|
fw-hestia-domain/src/main/java/cn/fw/hestia/domain/db/MessageHistory.java
@@ -31,10 +31,14 @@ public class MessageHistory extends Model<MessageHistory> { @@ -31,10 +31,14 @@ public class MessageHistory extends Model<MessageHistory> {
31 */ 31 */
32 private String templateCode; 32 private String templateCode;
33 /** 33 /**
34 - * 消息内容 34 + * 消息标题
35 */ 35 */
36 private String title; 36 private String title;
37 /** 37 /**
  38 + * 消息内容
  39 + */
  40 + private String content;
  41 + /**
38 * 关键词参数 (json字符串) 42 * 关键词参数 (json字符串)
39 */ 43 */
40 private String keywords; 44 private String keywords;
fw-hestia-domain/src/main/java/cn/fw/hestia/domain/vo/MessageHistoryVO.java
@@ -22,10 +22,14 @@ public class MessageHistoryVO { @@ -22,10 +22,14 @@ public class MessageHistoryVO {
22 */ 22 */
23 private Long memberId; 23 private Long memberId;
24 /** 24 /**
25 - * 消息内容 25 + * 消息标题
26 */ 26 */
27 private String title; 27 private String title;
28 /** 28 /**
  29 + * 消息内容
  30 + */
  31 + private String content;
  32 + /**
29 * 备注 33 * 备注
30 */ 34 */
31 private String remark; 35 private String remark;
@@ -46,6 +50,7 @@ public class MessageHistoryVO { @@ -46,6 +50,7 @@ public class MessageHistoryVO {
46 vo.setMessageId(history.getId()); 50 vo.setMessageId(history.getId());
47 vo.setMemberId(history.getMemberId()); 51 vo.setMemberId(history.getMemberId());
48 vo.setTitle(history.getTitle()); 52 vo.setTitle(history.getTitle());
  53 + vo.setContent(history.getContent());
49 vo.setReadz(history.getReadz()); 54 vo.setReadz(history.getReadz());
50 vo.setRemark(history.getRemark()); 55 vo.setRemark(history.getRemark());
51 vo.setMessageTime(history.getCreateTime()); 56 vo.setMessageTime(history.getCreateTime());
fw-hestia-sdk/src/main/java/cn/fw/hestia/sdk/params/TemplateMessageParam.java
@@ -3,8 +3,10 @@ package cn.fw.hestia.sdk.params; @@ -3,8 +3,10 @@ package cn.fw.hestia.sdk.params;
3 import lombok.Data; 3 import lombok.Data;
4 import lombok.ToString; 4 import lombok.ToString;
5 5
  6 +import javax.validation.constraints.Max;
6 import javax.validation.constraints.NotBlank; 7 import javax.validation.constraints.NotBlank;
7 import javax.validation.constraints.NotNull; 8 import javax.validation.constraints.NotNull;
  9 +import javax.validation.constraints.Size;
8 import java.util.Map; 10 import java.util.Map;
9 11
10 /** 12 /**
@@ -34,11 +36,18 @@ public class TemplateMessageParam { @@ -34,11 +36,18 @@ public class TemplateMessageParam {
34 @NotNull(message = "会员id不能为空") 36 @NotNull(message = "会员id不能为空")
35 private Long memberId; 37 private Long memberId;
36 /** 38 /**
37 - * 标题内容 对应「first」字段 39 + * 标题 小程序展示用
  40 + * maxLength 32
38 */ 41 */
39 - @NotBlank(message = "标题内容不能为空") 42 + @NotBlank(message = "标题不能为空")
  43 + @Size(max = 32, message = "标题太长")
40 private String title; 44 private String title;
41 /** 45 /**
  46 + * 消息内容 对应「first」字段
  47 + */
  48 + @NotBlank(message = "消息内容不能为空")
  49 + private String content;
  50 + /**
42 * 备注 51 * 备注
43 */ 52 */
44 private String remark; 53 private String remark;
fw-hestia-service/src/main/java/cn/fw/hestia/service/buz/MessageCenterBizService.java
@@ -228,6 +228,7 @@ public class MessageCenterBizService { @@ -228,6 +228,7 @@ public class MessageCenterBizService {
228 messageHistory.setMemberId(param.getMemberId()); 228 messageHistory.setMemberId(param.getMemberId());
229 messageHistory.setTemplateCode(getTemplateCode()); 229 messageHistory.setTemplateCode(getTemplateCode());
230 messageHistory.setTitle(param.getTitle()); 230 messageHistory.setTitle(param.getTitle());
  231 + messageHistory.setContent(param.getContent());
231 messageHistory.setRemark(param.getRemark()); 232 messageHistory.setRemark(param.getRemark());
232 messageHistory.setPagePath(param.getPath()); 233 messageHistory.setPagePath(param.getPath());
233 messageHistory.setReadz(Boolean.FALSE); 234 messageHistory.setReadz(Boolean.FALSE);
@@ -249,7 +250,7 @@ public class MessageCenterBizService { @@ -249,7 +250,7 @@ public class MessageCenterBizService {
249 private TMParam createTmParam(MessageHistory history) { 250 private TMParam createTmParam(MessageHistory history) {
250 TMParam tmParam = new TMParam(); 251 TMParam tmParam = new TMParam();
251 tmParam.setSceneToken(history.getId()); 252 tmParam.setSceneToken(history.getId());
252 - tmParam.setTitle(history.getTitle()); 253 + tmParam.setTitle(history.getContent());
253 tmParam.setRemark(history.getRemark()); 254 tmParam.setRemark(history.getRemark());
254 tmParam.setPath(history.getPagePath()); 255 tmParam.setPath(history.getPagePath());
255 tmParam.setTemplateCode(history.getTemplateCode()); 256 tmParam.setTemplateCode(history.getTemplateCode());