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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
package com.yeshi.fanli.dto;
 
import java.math.BigDecimal;
import java.util.Date;
 
import javax.persistence.Transient;
 
import com.google.gson.annotations.Expose;
import com.yeshi.fanli.entity.bus.user.Order;
import com.yeshi.fanli.entity.bus.user.UserInfo;
 
/**
 * 红包
 * 
 * @author Administrator
 *
 */
public class HongBao {
    // 状态编号 1-未到时间不可领取 2-可领取 3-已经领取 4-红包失效
    public final static int STATE_BUKELINGQU = 1;
    public final static int STATE_KELINGQU = 2;
    public final static int STATE_YILINGQU = 3;
    public final static int STATE_SHIXIAO = 4;
 
    // 淘宝购物红包
    public final static int TYPE_TAOBAO = 1;
    // 京东购物红包
    public final static int TYPE_JINGDONG = 2;
    // 活动红包
    public final static int TYPE_HUODONG = 3;
    // 新人红包
    public final static int TYPE_XINREN = 4;
 
    public final static int TYPE_YAOQING = 5;
    // 一级分销红包
    public final static int TYPE_YIJI = 6;
    // 二级分销红包
    public final static int TYPE_ERJI = 7;
 
    // 一级分享赚分销红包
    public final static int TYPE_SHARE_YIJI = 21;
    // 二级分享赚分销红包
    public final static int TYPE_SHARE_ERJI = 22;
 
    // 分享商品得来的红包
    public final static int TYPE_SHARE_GOODS = 20;
 
    @Expose
    private Long id;
 
    private UserInfo userInfo;
 
    private Long auctionId;
 
    private BigDecimal payMoney;
 
    /**
     * 分销红包对应的最上级红包
     */
 
    private HongBao parent;
 
    private BigDecimal money;
 
    private String param;// type对应的参数
 
    @Expose
    private Integer type;// 1-淘宝订单 2-京东订单 3-活动红包 4-新人红包 5.邀请好友红包(布心街的) 6.一级分销红包
                            // 7.二级分销红包 20-分享商品订单
 
    @Expose
    private Integer state;// 状态编号 1-未到时间不可领取 2-可领取 3-已经领取 4-红包失效
 
    @Expose
    private Long createtime;// 红包创建时间
 
    @Expose
 
    private Long preGettime;// 预计领取的时间
 
    @Expose
    private Long getTime;// 领取的时间
 
    @Expose
    private String getIp;// 领取的ip
 
    @Expose
    private String beizhu;
 
    @Expose
    private String orderId; // yes订单ID
 
    // 子订单的ID,只针对直接购买商品产生的红包有效
    private Long orderItemId;
 
    @Expose
    private Order order;
 
    /**
     * 红包拥有者的rank
     */
    private Integer urank;
 
    public HongBao() {
 
    }
 
    public HongBao(Long id) {
        this.id = id;
    }
 
    private Boolean hasChild;
 
    private Integer version;
 
    private Date balanceTime;
 
    @Transient // 分享邀请金额总额
    private BigDecimal ShareAndInviteMoney;
 
    public HongBao(UserInfo userInfo, BigDecimal money, String param, int type, int state, long createtime,
            long preGettime, long getTime, String getIp, String beizhu) {
        this.userInfo = userInfo;
        this.money = money;
        this.param = param;
        this.type = type;
        this.state = state;
        this.createtime = createtime;
        this.preGettime = preGettime;
        this.getTime = getTime;
        this.getIp = getIp;
        this.beizhu = beizhu;
        this.urank = 0;
        this.hasChild = false;
        this.version = 2;
    }
 
    public Boolean getHasChild() {
        return hasChild;
    }
 
    public void setHasChild(Boolean hasChild) {
        this.hasChild = hasChild;
    }
 
    public Long getOrderItemId() {
        return orderItemId;
    }
 
    public void setOrderItemId(Long orderItemId) {
        this.orderItemId = orderItemId;
    }
 
    public String getOrderId() {
        return orderId;
    }
 
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
 
    public HongBao getParent() {
        return parent;
    }
 
    public void setParent(HongBao parent) {
        this.parent = parent;
    }
 
    public Order getOrder() {
        return order;
    }
 
    public void setOrder(Order order) {
        this.order = order;
    }
 
    public Integer getUrank() {
        return urank;
    }
 
    public Long getAuctionId() {
        return auctionId;
    }
 
    public void setAuctionId(Long auctionId) {
        this.auctionId = auctionId;
    }
 
    public BigDecimal getPayMoney() {
        return payMoney;
    }
 
    public void setPayMoney(BigDecimal payMoney) {
        this.payMoney = payMoney;
    }
 
    public void setUrank(Integer urank) {
        this.urank = urank;
    }
 
    public String getParam() {
        return param;
    }
 
    public void setParam(String param) {
        this.param = param;
    }
 
    public Integer getType() {
        return type;
    }
 
    public void setType(Integer type) {
        this.type = type;
    }
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public UserInfo getUserInfo() {
        return userInfo;
    }
 
    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }
 
    public BigDecimal getMoney() {
        return money;
    }
 
    public void setMoney(BigDecimal money) {
        this.money = money;
    }
 
    public Integer getState() {
        return state;
    }
 
    public void setState(Integer state) {
        this.state = state;
    }
 
    public Long getCreatetime() {
        return createtime;
    }
 
    public void setCreatetime(Long createtime) {
        this.createtime = createtime;
    }
 
    public Long getPreGettime() {
        return preGettime;
    }
 
    public void setPreGettime(Long preGettime) {
        this.preGettime = preGettime;
    }
 
    public Long getGetTime() {
        return getTime;
    }
 
    public void setGetTime(Long getTime) {
        this.getTime = getTime;
    }
 
    public String getGetIp() {
        return getIp;
    }
 
    public void setGetIp(String getIp) {
        this.getIp = getIp;
    }
 
    public String getBeizhu() {
        return beizhu;
    }
 
    public void setBeizhu(String beizhu) {
        this.beizhu = beizhu;
    }
 
    public Integer getVersion() {
        return version;
    }
 
    public void setVersion(Integer version) {
        this.version = version;
    }
 
    public Date getBalanceTime() {
        return balanceTime;
    }
 
    public void setBalanceTime(Date balanceTime) {
        this.balanceTime = balanceTime;
    }
 
    public BigDecimal getShareAndInviteMoney() {
        return ShareAndInviteMoney;
    }
 
    public void setShareAndInviteMoney(BigDecimal shareAndInviteMoney) {
        ShareAndInviteMoney = shareAndInviteMoney;
    }
 
}