Commit 503bdbd7381bc27474a30a85bf994f36ed6e00b1

Authored by 张志伟
1 parent e465cbd2

:zap: 调整参数

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