jyy
2021-09-17 a5144f17a240a91ae9203c795ec52816becbc731
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
package com.matrix.system.app.vo;
 
import com.fasterxml.jackson.annotation.JsonFormat;
import com.matrix.core.tools.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
 
import java.util.Date;
 
/**
 * @author wzy
 * @date 2020-12-24
 **/
@ApiModel(value = "ServiceProjVo", description = "用户项目返回参数类")
public class ServiceProjVo {
 
    @ApiModelProperty(value = "id")
    private Long id;
 
    @ApiModelProperty(value = "订单ID")
    private Long projId;
 
    @ApiModelProperty(value = "商品名称")
    private String name;
 
    @ApiModelProperty(value = "时长")
    private Integer timeLength;
 
    @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8")
    @ApiModelProperty(value = "有效期")
    private Date invalidTime;
 
    @ApiModelProperty(value = "剩余数量")
    private Integer count;
 
    @ApiModelProperty(value = "图片")
    private String img;
 
    @ApiModelProperty(value = "快过期 1-是 2-否")
    private String isInvalid;
 
    @ApiModelProperty(value = " 使用情况余额")
    private Double balance;
 
    @ApiModelProperty(value = "项目状态 有效/无效")
    private String status;
 
    public String getIsInvalid() {
        Date date = DateUtil.getDateAfterMonth(new Date(), 1);
        if (invalidTime != null) {
            if (new Date().after(invalidTime)) {
                return "3";
            }
 
            if (date.after(invalidTime)) {
                return "1";
            }
        }
        return "2";
    }
 
    public void setIsInvalid(String isInvalid) {
        this.isInvalid = isInvalid;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
 
    public Integer getTimeLength() {
        return timeLength;
    }
 
    public void setTimeLength(Integer timeLength) {
        this.timeLength = timeLength;
    }
 
    public Long getProjId() {
        return projId;
    }
 
    public void setProjId(Long projId) {
        this.projId = projId;
    }
 
    public Date getInvalidTime() {
        return invalidTime;
    }
 
    public void setInvalidTime(Date invalidTime) {
        this.invalidTime = invalidTime;
    }
 
    public Integer getCount() {
        return count;
    }
 
    public void setCount(Integer count) {
        this.count = count;
    }
 
    public String getImg() {
        return img;
    }
 
    public void setImg(String img) {
        this.img = img;
    }
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public String getStatus() {
        if ("有效".equals(status)) {
            return "1";
        } else {
            return "2";
        }
    }
 
    public Double getBalance() {
        return balance;
    }
 
    public void setBalance(Double balance) {
        this.balance = balance;
    }
 
    public void setStatus(String status) {
        this.status = status;
    }
}