admin
2019-11-23 486e22c57ca8a1e2dc6877b539e2f3add67250f1
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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
package com.yeshi.fanli.entity.bus.user;
 
import java.math.BigDecimal;
 
import javax.persistence.Column;
import javax.persistence.Transient;
 
import org.yeshi.utils.mybatis.Table;
 
import com.google.gson.annotations.Expose;
import com.yeshi.fanli.entity.system.BusinessSystem;
 
/**
 * 用户信息
 * 
 * @author Administrator
 *
 */
@Table("yeshi_ec_user")
public class UserInfo {
    public static int STATE_NORMAL = 0;// 正常状态
    public static int STATE_DELETE = 1;// 删除状态
    public static int STATE_FORBIDDEN = 2;// 封禁状态
    public static int STATE_DELETE_OUT_OF_DATE = 4;// 用户长期不活跃被删除
 
    @Column(name = "id")
    @Expose
    private Long id;
    /**
     * 淘宝openId
     */
    @Expose
    @Column(name = "identifycode")
    private String openid;
 
    @Column(name = "login_type")
    @Expose
    private Integer loginType;// 1-淘宝
 
    @Column(name = "wx_open_id")
    @Expose
    private String wxOpenId;
 
    @Column(name = "wx_union_id")
    @Expose
    private String wxUnionId;
 
    @Column(name = "nick_name")
    @Expose
    private String nickName;// 昵称
 
    @Column(name = "tbName")
    @Expose
    private String tbName; // 淘宝昵称
 
    @Column(name = "tbPic")
    private String tbPic;// 淘宝头像
 
    @Column(name = "wxName")
    @Expose
    private String wxName;
 
    @Column(name = "wxPic")
    private String wxPic;
 
    @Column(name = "portrait")
    @Expose
    private String portrait;// 头像
 
    @Column(name = "createtime")
    @Expose
    private Long createtime;
 
    @Column(name = "last_logintime")
    @Expose
    private Long lastLoginTime;// 最近一次登录时间
 
    @Column(name = "loginip")
    @Expose
    private String lastLoginIp;// 最近一次登录IP
 
    @Column(name = "tuiguang_code")
    @Expose
    private String tuiGuangCode;// 推广码
 
    @Column(name = "appid")
    @Expose
    private String appId;//
 
    @Column(name = "my_hongBao")
    @Expose
    // @Type(type = "big_decimal")
    private BigDecimal myHongBao; // 我的红包
 
    @Transient
    @Expose
    private BigDecimal totalHongBao; // 累计的红包
    @Transient
    @Expose
    private BigDecimal noOpenHongBao; // 未打开红包
    @Transient
    @Expose
    private BigDecimal canOpenHongBao;
 
    @Column(name = "pay_password")
    private String payPassword;
 
    @Column(name = "sid")
    private BusinessSystem system;
 
    @Column(name = "rank")
    @Expose
    private Integer rank;// 0 普通 1 铜 2银 3 金
 
    @Column(name = "phone")
    @Expose
    private String phone; // 电话号码
 
    @Column(name = "state")
    private Integer state; // 用户的状态
 
    @Column(name = "state_desc")
    private String stateDesc;
 
    @Transient
    @Expose
    private String rankIcon;// 等级图标
    
 
    // 性别: 1-女  2-男
    @Transient
    @Expose
    private Integer sex;
    
    // 微信号
    @Transient
    @Expose
    private String weiXin;
    
    // 微信提示语
    @Transient
    @Expose
    private String weiXinTip;
 
    @Transient
    @Expose
    private String rankNamePicture;// 等级名称图片
    @Transient
    private String taoBaoUid;// 淘宝的用户ID
    
    //是否为VIP
    @Transient
    @Expose
    private boolean vip;
    
    
    public boolean isVip() {
        return vip;
    }
 
    public void setVip(boolean vip) {
        this.vip = vip;
    }
 
    public String getTaoBaoUid() {
        return taoBaoUid;
    }
 
    public void setTaoBaoUid(String taoBaoUid) {
        this.taoBaoUid = taoBaoUid;
    }
 
    public Integer getState() {
        return state;
    }
 
    public void setState(Integer state) {
        this.state = state;
    }
 
    public String getStateDesc() {
        return stateDesc;
    }
 
    public void setStateDesc(String stateDesc) {
        this.stateDesc = stateDesc;
    }
 
    public String getRankNamePicture() {
        return rankNamePicture;
    }
 
    public void setRankNamePicture(String rankNamePicture) {
        this.rankNamePicture = rankNamePicture;
    }
 
    public String getRankIcon() {
        return rankIcon;
    }
 
    public void setRankIcon(String rankIcon) {
        this.rankIcon = rankIcon;
    }
 
    // TODO
    public UserInfo() {
        openid = "";
        wxOpenId = "";
        wxUnionId = "";
        tbName = "";
        wxName = "";
        wxPic = "";
        tbPic = "";
        portrait = "";
        myHongBao = BigDecimal.valueOf(0);
        state = 0;
    }
 
    public UserInfo(long id) {
        super();
        this.id = id;
    }
 
    public String getTbPic() {
        return tbPic;
    }
 
    public void setTbPic(String tbPic) {
        this.tbPic = tbPic;
    }
 
    public String getWxPic() {
        return wxPic;
    }
 
    public void setWxPic(String wxPic) {
        this.wxPic = wxPic;
    }
 
    public String getTbName() {
        return tbName;
    }
 
    public void setTbName(String tbName) {
        this.tbName = tbName;
    }
 
    public String getWxName() {
        return wxName;
    }
 
    public void setWxName(String wxName) {
        this.wxName = wxName;
    }
 
    public String getWxOpenId() {
        return wxOpenId;
    }
 
    public void setWxOpenId(String wxOpenId) {
        this.wxOpenId = wxOpenId;
    }
 
    public String getPhone() {
        return phone;
    }
 
    public void setPhone(String phone) {
        this.phone = phone;
    }
 
    public String getWxUnionId() {
        return wxUnionId;
    }
 
    public void setWxUnionId(String wxUnionId) {
        this.wxUnionId = wxUnionId;
    }
 
    public Integer getRank() {
        return rank;
    }
 
    public void setRank(Integer rank) {
        this.rank = rank;
    }
 
    public String getAppId() {
        return appId;
    }
 
    public void setAppId(String appId) {
        this.appId = appId;
    }
 
    public String getTuiGuangCode() {
        return tuiGuangCode;
    }
 
    public void setTuiGuangCode(String tuiGuangCode) {
        this.tuiGuangCode = tuiGuangCode;
    }
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public String getOpenid() {
        return openid;
    }
 
    public void setOpenid(String openid) {
        this.openid = openid;
    }
 
    public Integer getLoginType() {
        return loginType;
    }
 
    public void setLoginType(Integer loginType) {
        this.loginType = loginType;
    }
 
    public String getNickName() {
        return nickName;
    }
 
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
 
    public String getPortrait() {
        return portrait;
    }
 
    public void setPortrait(String portrait) {
        this.portrait = portrait;
    }
 
    public Long getCreatetime() {
        return createtime;
    }
 
    public void setCreatetime(Long createtime) {
        this.createtime = createtime;
    }
 
    public Long getLastLoginTime() {
        return lastLoginTime;
    }
 
    public void setLastLoginTime(Long lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }
 
    public String getLastLoginIp() {
        return lastLoginIp;
    }
 
    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }
 
    public BusinessSystem getSystem() {
        return system;
    }
 
    public void setSystem(BusinessSystem system) {
        this.system = system;
    }
 
    public BigDecimal getMyHongBao() {
        return myHongBao;
    }
 
    public void setMyHongBao(BigDecimal myHongBao) {
        this.myHongBao = myHongBao;
    }
 
    public BigDecimal getTotalHongBao() {
        return totalHongBao;
    }
 
    public void setTotalHongBao(BigDecimal totalHongBao) {
        this.totalHongBao = totalHongBao;
    }
 
    public BigDecimal getNoOpenHongBao() {
        return noOpenHongBao;
    }
 
    public void setNoOpenHongBao(BigDecimal noOpenHongBao) {
        this.noOpenHongBao = noOpenHongBao;
    }
 
    public BigDecimal getCanOpenHongBao() {
        return canOpenHongBao;
    }
 
    public void setCanOpenHongBao(BigDecimal canOpenHongBao) {
        this.canOpenHongBao = canOpenHongBao;
    }
 
    public String getPayPassword() {
        return payPassword;
    }
 
    public void setPayPassword(String payPassword) {
        this.payPassword = payPassword;
    }
    
    public Integer getSex() {
        return sex;
    }
 
    public void setSex(Integer sex) {
        this.sex = sex;
    }
 
    public String getWeiXin() {
        return weiXin;
    }
 
    public void setWeiXin(String weiXin) {
        this.weiXin = weiXin;
    }
 
    public String getWeiXinTip() {
        return weiXinTip;
    }
 
    public void setWeiXinTip(String weiXinTip) {
        this.weiXinTip = weiXinTip;
    }
 
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (int) (id ^ (id >>> 32));
        return result;
    }
 
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        UserInfo other = (UserInfo) obj;
        if (id != other.id)
            return false;
        return true;
    }
 
}