Browse Source

用户管理,字典表修改

wyyay 2 years ago
parent
commit
98aa427d28

+ 9 - 9
base-common/src/main/java/com/ozs/common/core/domain/entity/SysDictData.java

@@ -45,12 +45,12 @@ public class SysDictData extends BaseEntity
     private String listClass;
 
     /** 是否默认(Y是 N否) */
-    @Excel(name = "是否默认", readConverterExp = "Y=是,N=否")
-    private String isDefault;
+    @Excel(name = "是否默认", readConverterExp = "(1是 2否)")
+    private Integer isDefault;
 
-    /** 状态(0正常 1停用) */
-    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
-    private String status;
+    /** 状态(1正常 2停用) */
+    @Excel(name = "状态", readConverterExp = "1正常 2停用")
+    private Integer status;
 
     public Long getDictCode()
     {
@@ -134,22 +134,22 @@ public class SysDictData extends BaseEntity
         return UserConstants.YES.equals(this.isDefault);
     }
 
-    public String getIsDefault()
+    public Integer getIsDefault()
     {
         return isDefault;
     }
 
-    public void setIsDefault(String isDefault)
+    public void setIsDefault(Integer isDefault)
     {
         this.isDefault = isDefault;
     }
 
-    public String getStatus()
+    public Integer getStatus()
     {
         return status;
     }
 
-    public void setStatus(String status)
+    public void setStatus(Integer status)
     {
         this.status = status;
     }

+ 20 - 5
base-common/src/main/java/com/ozs/common/core/domain/entity/SysDictType.java

@@ -30,9 +30,13 @@ public class SysDictType extends BaseEntity
     @Excel(name = "字典类型")
     private String dictType;
 
-    /** 状态(0正常 1停用) */
-    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
-    private String status;
+    /** 数据类型 1系统2业务 */
+    @Excel(name = "状态", readConverterExp = "1系统2业务")
+    private Integer dataType;
+
+    /** 状态(1正常 2停用) */
+    @Excel(name = "状态", readConverterExp = "1正常 2停用")
+    private Integer status;
 
     public Long getDictId()
     {
@@ -69,22 +73,33 @@ public class SysDictType extends BaseEntity
         this.dictType = dictType;
     }
 
-    public String getStatus()
+    public Integer getStatus()
     {
         return status;
     }
 
-    public void setStatus(String status)
+    public void setStatus(Integer status)
     {
         this.status = status;
     }
 
+    public Integer getDataType()
+    {
+        return dataType;
+    }
+
+    public void setDataType(Integer status)
+    {
+        this.dataType = dataType;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("dictId", getDictId())
             .append("dictName", getDictName())
             .append("dictType", getDictType())
+            .append("dataType", getDataType())
             .append("status", getStatus())
             .append("createBy", getCreateBy())
             .append("createTime", getCreateTime())

+ 5 - 5
base-common/src/main/java/com/ozs/common/core/domain/entity/SysUser.java

@@ -50,8 +50,8 @@ public class SysUser extends BaseEntity
     private String phoneNum;
 
     /** 用户性别 */
-    @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
-    private String sex;
+    @Excel(name = "用户性别", readConverterExp = "1男 2女 3未知")
+    private Integer sex;
 
     /** 用户头像 */
     private String avatar;
@@ -60,7 +60,7 @@ public class SysUser extends BaseEntity
     private String password;
 
     /** 帐号状态(0正常 1停用) */
-    @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
+    @Excel(name = "帐号状态", readConverterExp = "1正常 2停用")
     private Integer status;
 
     /** 删除标志(0代表存在 2代表删除) */
@@ -188,12 +188,12 @@ public class SysUser extends BaseEntity
         this.phoneNum = phoneNum;
     }
 
-    public String getSex()
+    public Integer getSex()
     {
         return sex;
     }
 
-    public void setSex(String sex)
+    public void setSex(Integer sex)
     {
         this.sex = sex;
     }

+ 5 - 1
base-system/src/main/resources/mapper/system/SysDictDataMapper.xml

@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="dictLabel"  column="dict_label"  />
 		<result property="dictValue"  column="dict_value"  />
 		<result property="dictType"   column="dict_type"   />
+		<result property="dataType"   column="dataType"   />
 		<result property="cssClass"   column="css_class"   />
 		<result property="listClass"  column="list_class"  />
 		<result property="isDefault"  column="is_default"  />
@@ -21,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 
 	<sql id="selectDictDataVo">
-        select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark
+        select dict_code, dict_sort, dict_label, dict_value, dict_type,data_type, css_class, list_class, is_default, status, create_by, create_time, remark
 		from sys_dict_data
     </sql>
 
@@ -78,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if>
  			<if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if>
  			<if test="dictType != null and dictType != ''">dict_type = #{dictType},</if>
+			<if test="dataType != null and dataType != ''">data_type = #{dataType},</if>
  			<if test="cssClass != null">css_class = #{cssClass},</if>
  			<if test="listClass != null">list_class = #{listClass},</if>
  			<if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if>
@@ -99,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
  			<if test="dictValue != null and dictValue != ''">dict_value,</if>
  			<if test="dictType != null and dictType != ''">dict_type,</if>
+		    <if test="dataType != null and dataType != ''">data_type,</if>
  			<if test="cssClass != null and cssClass != ''">css_class,</if>
  			<if test="listClass != null and listClass != ''">list_class,</if>
  			<if test="isDefault != null and isDefault != ''">is_default,</if>
@@ -111,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  		    <if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if>
  			<if test="dictValue != null and dictValue != ''">#{dictValue},</if>
  			<if test="dictType != null and dictType != ''">#{dictType},</if>
+		    <if test="dataType != null and dataType != ''">#{dataType},</if>
  			<if test="cssClass != null and cssClass != ''">#{cssClass},</if>
  			<if test="listClass != null and listClass != ''">#{listClass},</if>
  			<if test="isDefault != null and isDefault != ''">#{isDefault},</if>

+ 1 - 1
base-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -139,7 +139,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</select>
 
 	<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
-		select id, phonenumber from sys_user where phone_num = #{phoneNum} and del_flag = '0' limit 1
+		select id, phone_num from sys_user where phone_num = #{phoneNum} and del_flag = '0' limit 1
 	</select>
 
 	<select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">