📄 userinfo.java
字号:
package com.ufmobile.common.login.entity;
import java.io.Serializable;
/**
* <p>
* 当前用户唯一标识
* <p>
* 创建日期:Dec 22, 2006
*
* @author msf
* @since v3.0
*/
public class UserInfo implements Serializable {
private static final long serialVersionUID = 8919647799773816563L;
private Long usrid = null; // 当前用户id
private Integer type = null; // 类型 0 会员 1 商街操作员 2 代理商
private Long streetid = null;// 商街id
private Long shopid = null;// 当前商铺id
private String sUsrName = null;// 用户名
private Long lashModiTs = null;// 上次修改时间
private Long LoginTs = null;// 本次登陆时间
private Long lastLoginTs = null;// 上次登录时间
private String managestreetids = null;// 当前用户管理商街 如果是会员则是商铺
public int localID;
public static final int Member = 0;//会员
public static final int Operator = 1;//运营
public static final int Agent = 2;//代理商
public static final Long NoLogINID = -10000L;//游客id
public static final int guest=10000;//游客
public Long agentid = null;
public UserInfo() {
super();
}
public UserInfo(Long usrid, Integer type, Long streetid, Long shopid, String usrName, Long lashModiTs, Long loginTs, Long lastLoginTs, String managestreetids) {
super();
// TODO Auto-generated constructor stub
this.usrid = usrid;
this.type = type;
this.streetid = streetid;
this.shopid = shopid;
sUsrName = usrName;
this.lashModiTs = lashModiTs;
LoginTs = loginTs;
this.lastLoginTs = lastLoginTs;
this.managestreetids = managestreetids;
}
@Override
public UserInfo clone() {
// TODO Auto-generated method stub
UserInfo user = new UserInfo(usrid,type,streetid,shopid,sUsrName,lashModiTs,LoginTs,lastLoginTs,managestreetids);
user.setLocalID(this.getLocalID());
return user;
}
/**
* 作者:msf <br>
* 日期:Dec 22, 2006
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (obj instanceof UserInfo) {
UserInfo o = (UserInfo) obj;
try {
if (type.intValue() == Member) {
return type.equals(o.getType()) && usrid.equals(o.getUsrid())
&& shopid.equals(o.getShopid());
} else {
return type.equals(o.getType()) && usrid.equals(o.getUsrid());
}
} catch (Exception e) {
}
}
return false;
}
@Override
public int hashCode() {
return usrid.hashCode();
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Long getUsrid() {
return usrid;
}
public void setUsrid(Long usrid) {
this.usrid = usrid;
}
public Long getStreetid() {
return streetid;
}
public void setStreetid(Long streetid) {
this.streetid = streetid;
}
public Long getShopid() {
return shopid;
}
public void setShopid(Long shopid) {
this.shopid = shopid;
}
public String getUsrName() {
return sUsrName;
}
public void setUsrName(String usrName) {
sUsrName = usrName;
}
public Long getLashModiTs() {
return lashModiTs;
}
public void setLashModiTs(Long lashModiTs) {
this.lashModiTs = lashModiTs;
}
public String getManagestreetidString() {
return managestreetids;
}
public void setManagestreetidString(String managestreetids) {
this.managestreetids = managestreetids;
}
public Long[] getManagestreetid() {
if (managestreetids == null)
return null;
String id[] = managestreetids.split(",");
Long[] ret = new Long[id.length];
for (int i = 0; i < id.length; i++) {
ret[i] = new Long(id[i]);
}
return ret;
}
public Long getLoginTs() {
return LoginTs;
}
public void setLoginTs(Long loginTs) {
LoginTs = loginTs;
}
public Long getLastLoginTs() {
return lastLoginTs;
}
public void setLastLoginTs(Long lastLoginTs) {
this.lastLoginTs = lastLoginTs;
}
public Long getAgentid() {
return agentid;
}
public int getLocalID() {
return localID;
}
public void setLocalID(int localID) {
this.localID = localID;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -