package com.yeshi.fanli.entity.bus.user;
|
|
import java.io.Serializable;
|
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 implements Serializable{
|
/**
|
*
|
*/
|
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 = "type")
|
@Expose
|
private Integer type;// 用户类型 0-普通用户 1-虚拟用户
|
|
@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;
|
|
@Column(name = "platform")
|
private String platform;//来源平台
|
|
public String getPlatform() {
|
return platform;
|
}
|
|
public void setPlatform(String platform) {
|
this.platform = platform;
|
}
|
|
@Transient
|
@Expose
|
private String rankIcon;// 等级图标
|
|
// 性别: 1-女 2-男
|
@Transient
|
@Expose
|
private Integer sex;
|
|
// 微信号
|
@Transient
|
@Expose
|
private String weiXin;
|
|
// 二维码
|
@Transient
|
@Expose
|
private String erCode;
|
|
// 微信提示语
|
@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 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;
|
}
|
|
public Integer getType() {
|
return type;
|
}
|
|
public void setType(Integer type) {
|
this.type = type;
|
}
|
|
public String getErCode() {
|
return erCode;
|
}
|
|
public void setErCode(String erCode) {
|
this.erCode = erCode;
|
}
|
|
@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;
|
}
|
|
}
|