Browse Source

用户模块修改

anderx 2 years ago
parent
commit
14b6a038d5

+ 71 - 0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java

@@ -3,6 +3,8 @@ package com.ruoyi.common.core.domain.entity;
 import java.util.Date;
 import java.util.List;
 import javax.validation.constraints.*;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -64,6 +66,7 @@ public class SysUser extends BaseEntity
 
     /** 最后登录IP */
     @Excel(name = "最后登录IP", type = Type.EXPORT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private String loginIp;
 
     /** 最后登录时间 */
@@ -77,6 +80,33 @@ public class SysUser extends BaseEntity
     })
     private SysDept dept;
 
+    /**
+     * 微信公共编号
+     */
+    private String openId;
+
+
+
+    /**
+     * 上级管理用户ID
+     */
+    private Long superiorId;
+
+    /**
+     * 项目数量
+     */
+    private Integer projectQuantity;
+
+    /**
+     * 工号
+     */
+    private String jobNumber;
+
+    /**
+     *  0=兼职,1=全职
+     */
+    private Integer fullJob;
+
     /** 角色对象 */
     private List<SysRole> roles;
 
@@ -94,6 +124,47 @@ public class SysUser extends BaseEntity
 
     }
 
+
+    public String getOpenId() {
+        return openId;
+    }
+
+    public void setOpenId(String openId) {
+        this.openId = openId;
+    }
+
+    public Long getSuperiorId() {
+        return superiorId;
+    }
+
+    public void setSuperiorId(Long superiorId) {
+        this.superiorId = superiorId;
+    }
+
+    public Integer getProjectQuantity() {
+        return projectQuantity;
+    }
+
+    public void setProjectQuantity(Integer projectQuantity) {
+        this.projectQuantity = projectQuantity;
+    }
+
+    public String getJobNumber() {
+        return jobNumber;
+    }
+
+    public void setJobNumber(String jobNumber) {
+        this.jobNumber = jobNumber;
+    }
+
+    public Integer getFullJob() {
+        return fullJob;
+    }
+
+    public void setFullJob(Integer fullJob) {
+        this.fullJob = fullJob;
+    }
+
     public SysUser(Long userId)
     {
         this.userId = userId;

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

@@ -23,6 +23,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"     column="update_by"    />
         <result property="updateTime"   column="update_time"  />
         <result property="remark"       column="remark"       />
+        <result property="openId"       column="open_id"       />
+        <result property="superiorId"       column="superior_id"       />
+        <result property="projectQuantity"       column="project_quantity"       />
+        <result property="jobNumber"       column="job_number"       />
+        <result property="fullJob"       column="full_job"       />
         <association property="dept"    javaType="SysDept"         resultMap="deptResult" />
         <collection  property="roles"   javaType="java.util.List"  resultMap="RoleResult" />
     </resultMap>
@@ -57,7 +62,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
-		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
+		select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag,
+		       u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader,u.open_id,u.superior_id,
+		       u.project_quantity,u.job_number,u.full_job
+		from sys_user u
 		left join sys_dept d on u.dept_id = d.dept_id
 		where u.del_flag = '0'
 		<if test="userId != null and userId != 0">
@@ -157,6 +165,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">status,</if>
  			<if test="createBy != null and createBy != ''">create_by,</if>
  			<if test="remark != null and remark != ''">remark,</if>
+ 			<if test="openId != null and openId != ''">open_id,</if>
+ 			<if test="superiorId != null and superiorId != ''">superior_id,</if>
+ 			<if test="projectQuantity != null and projectQuantity != ''">project_quantity,</if>
+ 			<if test="jobNumber != null and jobNumber != ''">job_number,</if>
+ 			<if test="fullJob != null and fullJob != ''">full_job,</if>
  			create_time
  		)values(
  			<if test="userId != null and userId != ''">#{userId},</if>
@@ -171,6 +184,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
+			<if test="openId != null and openId != ''">#{openId},</if>
+			<if test="superiorId != null and superiorId != ''">#{superiorId},</if>
+			<if test="projectQuantity != null and projectQuantity != ''">#{projectQuantity},</if>
+			<if test="jobNumber != null and jobNumber != ''">#{jobNumber},</if>
+			<if test="fullJob != null and fullJob != ''">#{fullJob},</if>
  			sysdate()
  		)
 	</insert>
@@ -191,6 +209,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="loginDate != null">login_date = #{loginDate},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  			<if test="remark != null">remark = #{remark},</if>
+			<if test="openId != null">
+				open_id = #{openId,jdbcType=VARCHAR},
+			</if>
+			<if test="superiorId != null">
+				superior_id = #{superiorId,jdbcType=BIGINT},
+			</if>
+			<if test="projectQuantity != null">
+				project_quantity = #{projectQuantity,jdbcType=INTEGER},
+			</if>
+			<if test="jobNumber != null">
+				job_number = #{jobNumber,jdbcType=VARCHAR},
+			</if>
+			<if test="fullJob != null">
+				full_job = #{fullJob,jdbcType=INTEGER},
+			</if>
  			update_time = sysdate()
  		</set>
  		where user_id = #{userId}