zhuguifei
2025-04-28 442928123f63ee497d766f9a7a14f0a6ee067e25
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
package org.jeecg.common.api.dto.message;
 
import lombok.Data;
import org.jeecg.common.constant.CommonConstant;
 
import java.io.Serializable;
 
/**
 * 普通消息
 */
@Data
public class MessageDTO implements Serializable {
 
    private static final long serialVersionUID = -5690444483968058442L;
 
    /**
     * 发送人(用户登录账户)
     */
    protected String fromUser;
 
    /**
     * 发送给(用户登录账户)
     */
    protected String toUser;
 
    /**
     * 发送给所有人
     */
    protected boolean toAll;
 
    /**
     * 消息主题
     */
    protected String title;
 
    /**
     * 消息内容
     */
    protected String content;
 
    /**
     * 消息类型 1:消息  2:系统消息
     */
    protected String category;
 
 
    public MessageDTO(){
 
    }
 
    /**
     * 构造器1 系统消息
     */
    public MessageDTO(String fromUser,String toUser,String title, String content){
        this.fromUser = fromUser;
        this.toUser = toUser;
        this.title = title;
        this.content = content;
        //默认 都是2系统消息
        this.category = CommonConstant.MSG_CATEGORY_2;
    }
 
    /**
     * 构造器2 支持设置category 1:消息  2:系统消息
     */
    public MessageDTO(String fromUser,String toUser,String title, String content, String category){
        this.fromUser = fromUser;
        this.toUser = toUser;
        this.title = title;
        this.content = content;
        this.category = category;
    }
 
}