Commit 131adad9c070e650fea9e644f1cca391987152e0

Authored by YunaiV
1 parent 872107b3

review 部分站内信的实现

yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/notify/NotifyReadStatusEnum.java deleted
1 -package cn.iocoder.yudao.module.system.enums.notify;  
2 -  
3 -import lombok.AllArgsConstructor;  
4 -import lombok.Getter;  
5 -  
6 -/**  
7 - * 站内信阅读状态枚举类  
8 - *  
9 - * @author xrcoder  
10 - */  
11 -@Getter  
12 -@AllArgsConstructor  
13 -public enum NotifyReadStatusEnum {  
14 -  
15 - UNREAD(0),  
16 - READ(1);  
17 -  
18 - /**  
19 - * 类型  
20 - */  
21 - private final Integer status;  
22 -}  
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/UserNotifyMessageController.java
@@ -28,11 +28,7 @@ import java.util.List; @@ -28,11 +28,7 @@ import java.util.List;
28 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; 28 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
29 import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; 29 import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
30 30
31 -/**  
32 - * 管理后台 - 站内信-消息中心  
33 - *  
34 - * @author xrcoder  
35 - */ 31 +// TODO 芋艿:合并到 合并到 NotifyTemplateController 中
36 @Api(tags = "管理后台 - 站内信-消息中心") 32 @Api(tags = "管理后台 - 站内信-消息中心")
37 @RestController 33 @RestController
38 @RequestMapping("/system/user/notify-message") 34 @RequestMapping("/system/user/notify-message")
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/notify/NotifyMessageDO.java
1 package cn.iocoder.yudao.module.system.dal.dataobject.notify; 1 package cn.iocoder.yudao.module.system.dal.dataobject.notify;
2 2
3 -import lombok.*;  
4 -import java.util.*;  
5 -import com.baomidou.mybatisplus.annotation.*; 3 +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
6 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; 4 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
  5 +import com.baomidou.mybatisplus.annotation.KeySequence;
  6 +import com.baomidou.mybatisplus.annotation.TableId;
  7 +import com.baomidou.mybatisplus.annotation.TableName;
  8 +import lombok.*;
  9 +
  10 +import java.util.Date;
7 11
8 /** 12 /**
9 * 站内信 DO 13 * 站内信 DO
@@ -27,14 +31,20 @@ public class NotifyMessageDO extends BaseDO { @@ -27,14 +31,20 @@ public class NotifyMessageDO extends BaseDO {
27 private Long id; 31 private Long id;
28 /** 32 /**
29 * 站内信模版编号 33 * 站内信模版编号
  34 + *
  35 + * 关联 {@link NotifyTemplateDO#getId()}
30 */ 36 */
31 private Long templateId; 37 private Long templateId;
32 /** 38 /**
33 * 用户编号 39 * 用户编号
  40 + *
  41 + * 关联 MemberUserDO 的 id 字段、或者 AdminUserDO 的 id 字段
34 */ 42 */
35 private Long userId; 43 private Long userId;
36 /** 44 /**
37 * 用户类型 45 * 用户类型
  46 + *
  47 + * 枚举 {@link UserTypeEnum}
38 */ 48 */
39 private Integer userType; 49 private Integer userType;
40 /** 50 /**
@@ -46,11 +56,9 @@ public class NotifyMessageDO extends BaseDO { @@ -46,11 +56,9 @@ public class NotifyMessageDO extends BaseDO {
46 */ 56 */
47 private String content; 57 private String content;
48 /** 58 /**
49 - * 是否已读 0-未读 1-已读  
50 - *  
51 - * 枚举 {@link cn.iocoder.yudao.module.system.enums.notify.NotifyReadStatusEnum} 59 + * 是否已读
52 */ 60 */
53 - private Integer readStatus; 61 + private Boolean readStatus;
54 /** 62 /**
55 * 阅读时间 63 * 阅读时间
56 */ 64 */
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/notify/NotifyTemplateDO.java
@@ -31,38 +31,32 @@ public class NotifyTemplateDO extends BaseDO { @@ -31,38 +31,32 @@ public class NotifyTemplateDO extends BaseDO {
31 */ 31 */
32 @TableId 32 @TableId
33 private Long id; 33 private Long id;
34 -  
35 /** 34 /**
36 * 模版编码 35 * 模版编码
37 */ 36 */
38 private String code; 37 private String code;
39 -  
40 /** 38 /**
41 * 模版标题 39 * 模版标题
42 */ 40 */
43 private String title; 41 private String title;
44 -  
45 /** 42 /**
46 * 模版内容 43 * 模版内容
47 */ 44 */
48 private String content; 45 private String content;
49 -  
50 /** 46 /**
51 * 参数数组 47 * 参数数组
52 */ 48 */
53 @TableField(typeHandler = JacksonTypeHandler.class) 49 @TableField(typeHandler = JacksonTypeHandler.class)
54 private List<String> params; 50 private List<String> params;
55 -  
56 /** 51 /**
57 - * 状态:1-启用 0-禁用  
58 - * <p> 52 + * 状态
  53 + *
59 * 枚举 {@link CommonStatusEnum} 54 * 枚举 {@link CommonStatusEnum}
60 */ 55 */
61 private String status; 56 private String status;
62 -  
63 /** 57 /**
64 * 备注 58 * 备注
65 */ 59 */
66 - private String remarks; 60 + private String remark;
67 61
68 } 62 }