Procházet zdrojové kódy

字段长度修改

wangmh před 8 roky
rodič
revize
59f9b10003

+ 1 - 1
sso-common/src/test/java/test/Test.java

@@ -16,7 +16,7 @@ import static com.alibaba.fastjson.JSON.parseObject;
 public class Test {
 
     public static void main(String[] args) throws Exception {
-        String url = "http://192.168.253.66:8081/api/user";
+        String url = "http://10.1.51.50:8081/api/user";
         url = url + "/info";
         ModelMap data = new ModelMap();
         data.put("userUU", 10000L);

+ 8 - 8
sso-server/src/main/java/com/uas/sso/entity/Appeal.java

@@ -30,25 +30,25 @@ public class Appeal implements Serializable {
     /**
      * 新手机号
      */
-    @Column(name = "mobile", nullable = false)
+    @Column(name = "mobile", nullable = false, length = 11)
     private String mobile;
 
     /**
      * 申述类型(resetPwd or validAccount or changeAdmin)
      */
-    @Column(name = "type", nullable = false)
+    @Column(name = "type", nullable = false, length = 20)
     private String type;
 
     /**
      * 提交信息
      */
-    @Column(name = "submit_info", nullable = false, length = 2000)
+    @Column(name = "submit_info", nullable = false, length = 1000)
     private String submitInfo;
 
     /**
      * 申述说明
      */
-    @Column(name = "description", nullable = false, length = 2000)
+    @Column(name = "description", nullable = false, length = 1000)
     private String description;
 
     /**
@@ -60,19 +60,19 @@ public class Appeal implements Serializable {
     /**
      * 联系人
      */
-    @Column(name = "contact_name", nullable = false)
+    @Column(name = "contact_name", nullable = false, length = 20)
     private String contactName;
 
     /**
      * 联系人手机号
      */
-    @Column(name = "contact_tel", nullable = false)
+    @Column(name = "contact_tel", nullable = false, length = 11)
     private String contactTel;
 
     /**
      * 联系人邮箱
      */
-    @Column(name = "contact_email", nullable = false)
+    @Column(name = "contact_email", nullable = false, length = 100)
     private String contactEmail;
 
 
@@ -85,7 +85,7 @@ public class Appeal implements Serializable {
     /**
      * 审核人
      */
-    @Column(name = "auditor")
+    @Column(name = "auditor", length = 50)
     private String auditor;
 
     /**

+ 16 - 15
sso-server/src/main/java/com/uas/sso/entity/User.java

@@ -2,6 +2,7 @@ package com.uas.sso.entity;
 
 import com.alibaba.fastjson.annotation.JSONField;
 import java.io.Serializable;
+import java.sql.Time;
 import java.sql.Timestamp;
 import java.util.HashSet;
 import java.util.List;
@@ -36,19 +37,19 @@ public class User implements Serializable {
     /**
      * 会员名
      */
-    @Column(name = "vip_name", nullable = false)
+    @Column(name = "vip_name", nullable = false, length = 100)
     private String vipName;
 
     /**
      * 手机号
      */
-    @Column(name = "mobile", unique = true, nullable = false)
+    @Column(name = "mobile", unique = true, nullable = false, length = 11)
     private String mobile;
 
     /**
      * 手机号所属区域(continent or Hongkong)
      */
-    @Column(name = "mobile_area")
+    @Column(name = "mobile_area", length = 30)
     private String mobileArea;
 
     /**
@@ -139,7 +140,7 @@ public class User implements Serializable {
      * 出生日期
      */
     @Column(name = "birthday")
-    private String birthday;
+    private Timestamp birthday;
 
     /**
      * 微信号(微信扫码授权或微信客户端授权,不用出现在注册页面,预留)
@@ -156,38 +157,38 @@ public class User implements Serializable {
     /**
      * 国籍(不用出现在注册页面,预留)
      */
-    @Column(name = "nationality")
+    @Column(name = "nationality", length = 50)
     private String nationality;
 
     /**
      * 籍贯(不用出现在注册页面,预留)
      */
-    @Column(name = "native_place")
+    @Column(name = "native_place", length = 50)
     private String nativePlace;
 
     /**
      * 现在所在国家(不用出现在注册页面,预留)
      */
-    @Column(name = "user_country")
+    @Column(name = "user_country", length = 50)
     private String country;
 
     /**
      * 现在所在省份、州、直辖市、行政区(不用出现在注册页面,预留)
      */
-    @Column(name = "user_province")
+    @Column(name = "user_province", length = 50)
     private String province;
 
     /**
      * 现在所在城市(不用出现在注册页面,预留)
      */
-    @Column(name = "user_city")
+    @Column(name = "user_city", length = 50)
     private String city;
 
     /**
      * 账户是否冻结(1、冻结)
      */
     @Column(name = "_lock")
-    private Integer lock;
+    private Short lock;
 
     /**
      * imId
@@ -371,11 +372,11 @@ public class User implements Serializable {
         this.sex = sex;
     }
 
-    public String getBirthday() {
+    public Timestamp getBirthday() {
         return birthday;
     }
 
-    public void setBirthday(String birthday) {
+    public void setBirthday(Timestamp birthday) {
         this.birthday = birthday;
     }
 
@@ -435,11 +436,11 @@ public class User implements Serializable {
         this.city = city;
     }
 
-    public Integer getLock() {
+    public Short getLock() {
         return lock;
     }
 
-    public void setLock(Integer lock) {
+    public void setLock(Short lock) {
         this.lock = lock;
     }
 
@@ -493,7 +494,7 @@ public class User implements Serializable {
         userView.setRealName(this.getRealName());
         userView.setIdCard(this.getIdCard());
         userView.setIdentityValidCode(this.getIdentityValidCode());
-        userView.setLock(this.getLock());
+        userView.setLock(Integer.valueOf(this.getLock()));
         userView.setImId(this.getImId());
         userView.setPassword(this.getPassword());
         return userView;

+ 12 - 12
sso-server/src/main/java/com/uas/sso/entity/Userspace.java

@@ -34,13 +34,13 @@ public class Userspace implements Serializable {
     /**
      * 企业名称
      */
-    @Column(name = "space_name", nullable = false, unique = true)
+    @Column(name = "space_name", nullable = false, unique = true, length = 99)
     private String spaceName;
 
     /**
      * 法定代表人
      */
-    @Column(name = "corporation")
+    @Column(name = "corporation", length = 20)
     private String corporation;
 
     /**
@@ -65,7 +65,7 @@ public class Userspace implements Serializable {
     /**
      * 营业执照号
      */
-    @Column(name = "business_code", unique = true)
+    @Column(name = "business_code", unique = true, length = 100)
     private String businessCode;
 
     /**
@@ -83,49 +83,49 @@ public class Userspace implements Serializable {
     /**
      * 注册地址所在省份、州、直辖市、行政区
      */
-    @Column(name = "reg_province")
+    @Column(name = "reg_province", length = 50)
     private String regProvince;
 
     /**
      * 注册地址所在城市
      */
-    @Column(name = "reg_city")
+    @Column(name = "reg_city", length = 50)
     private String regCity;
 
     /**
      * 注册地址所在区域
      */
-    @Column(name = "reg_district")
+    @Column(name = "reg_district", length = 50)
     private String regDistrict;
 
     /**
      * 注册地址所在街道
      */
-    @Column(name = "reg_street")
+    @Column(name = "reg_street", length = 50)
     private String regStreet;
 
     /**
      * 公司地址经度
      */
-    @Column(name = "company_longitude")
+    @Column(name = "company_longitude", length = 50)
     private String companyLongitude;
 
     /**
      * 公司地址纬度
      */
-    @Column(name = "company_latitude")
+    @Column(name = "company_latitude", length = 50)
     private String companyLatitude;
 
     /**
      * 公司所在国家
      */
-    @Column(name = "company_country")
+    @Column(name = "company_country", length = 50)
     private String companyCountry;
 
     /**
      * 公司所在省份、州、直辖市、行政区
      */
-    @Column(name = "company_province")
+    @Column(name = "company_province", length = 50)
     private String companyProvince;
 
     /**
@@ -155,7 +155,7 @@ public class Userspace implements Serializable {
     /**
      * 企业联系电话
      */
-    @Column(name = "telephone")
+    @Column(name = "telephone", length = 20)
     private String telephone;
 
     /**