|
|
@@ -4,12 +4,16 @@ import android.text.TextUtils;
|
|
|
|
|
|
import com.sheep.gamegroup.util.BinaryUtils;
|
|
|
import com.sheep.gamegroup.util.TestUtil;
|
|
|
+import com.sheep.gamegroup.util.TimeUtil;
|
|
|
import com.sheep.gamegroup.util.share.ShareLinkConfig;
|
|
|
+import com.sheep.gamegroup.util.string.SpannableSb;
|
|
|
+import com.sheep.jiuyan.samllsheep.R;
|
|
|
|
|
|
import org.xutils.db.annotation.Column;
|
|
|
import org.xutils.db.annotation.Table;
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
+import java.util.Locale;
|
|
|
|
|
|
/**
|
|
|
* Created by ljy on 2018/3/17.
|
|
|
@@ -52,6 +56,7 @@ public class UserEntity implements Serializable {
|
|
|
private int create_time_line;//1:小绵羊3.0之前的用户(注:以后如果再次有这种区分之前用户的需求就陆续加一)
|
|
|
private int bind_flag;//绑定表示 二进制形式 从低到高 第一位手机号 第二位QQ号 第三位微信
|
|
|
private int level;//用户等级 0:普通用户 1:VIP用户
|
|
|
+ private int vip_time;//用户vip期限
|
|
|
|
|
|
public int getPackage_cate() {
|
|
|
return package_cate;
|
|
|
@@ -309,6 +314,14 @@ public class UserEntity implements Serializable {
|
|
|
this.level = level;
|
|
|
}
|
|
|
|
|
|
+ public int getVip_time() {
|
|
|
+ return vip_time;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setVip_time(int vip_time) {
|
|
|
+ this.vip_time = vip_time;
|
|
|
+ }
|
|
|
+
|
|
|
public int getMust_bind_mobile() {
|
|
|
return must_bind_mobile;
|
|
|
}
|
|
|
@@ -406,4 +419,8 @@ public class UserEntity implements Serializable {
|
|
|
public boolean isVIP(){
|
|
|
return level >= LEVEL_VIP;
|
|
|
}
|
|
|
+ public CharSequence getVIPInfo(){
|
|
|
+ String info = String.format(Locale.CHINA, "(%s到期)", TimeUtil.TimeStamp2Date(vip_time, "yyyy/MM/dd"));
|
|
|
+ return new SpannableSb().append("VIP").append(info, R.dimen.text_size_10).getSsb();
|
|
|
+ }
|
|
|
}
|