admin
2019-08-26 d28bed1a1275131a5ca37f7da37961e2b518ac07
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
package com.yeshi.fanli.vo.msg;
 
import org.yeshi.utils.mybatis.Table;
 
import com.yeshi.fanli.entity.bus.msg.UserMsgUnReadNum;
 
/*
 * 用户消息已读状态存储
 */
@Table("yeshi_ec_msg_read_state")
public class UserMsgUnReadNumVO {
    private String typeOrder;// 订单消息未读数
 
    private String typeMoney;// 资金消息未读数
 
    private String typeAccount;// 账户消息未读数
 
    private String typeInvite;// 邀请消息未读数
 
    private String typeScore;// 积分消息未读数
 
    private String typeSystem;// 系统消息未读数
 
    public UserMsgUnReadNumVO(UserMsgUnReadNum num) {
        this.typeAccount = getCountDesc(num.getTypeAccount());
        this.typeInvite = getCountDesc(num.getTypeInvite());
        this.typeMoney = getCountDesc(num.getTypeMoney());
        this.typeOrder = getCountDesc(num.getTypeOrder());
        this.typeScore = getCountDesc(num.getTypeScore());
        this.typeSystem = getCountDesc(num.getTypeSystem());
    }
 
    static String getCountDesc(int count) {
        if (count >= 100)
            return "99+";
        else
            return count + "";
    }
 
    public UserMsgUnReadNumVO() {
 
    }
 
    public String getTypeOrder() {
        return typeOrder;
    }
 
    public void setTypeOrder(String typeOrder) {
        this.typeOrder = typeOrder;
    }
 
    public String getTypeMoney() {
        return typeMoney;
    }
 
    public void setTypeMoney(String typeMoney) {
        this.typeMoney = typeMoney;
    }
 
    public String getTypeSystem() {
        return typeSystem;
    }
 
    public void setTypeSystem(String typeSystem) {
        this.typeSystem = typeSystem;
    }
 
    public String getTypeAccount() {
        return typeAccount;
    }
 
    public void setTypeAccount(String typeAccount) {
        this.typeAccount = typeAccount;
    }
 
    public String getTypeInvite() {
        return typeInvite;
    }
 
    public void setTypeInvite(String typeInvite) {
        this.typeInvite = typeInvite;
    }
 
    public String getTypeScore() {
        return typeScore;
    }
 
    public void setTypeScore(String typeScore) {
        this.typeScore = typeScore;
    }
 
}