Procházet zdrojové kódy

新增科研平台编号

anderx před 4 měsíci
rodič
revize
00a809e31d

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

@@ -150,6 +150,15 @@ public class SysUser extends BaseEntity
     private Integer durationSort;
     private String ddUserId;
     private String tianheId;
+    private String kyId;
+
+    public String getKyId() {
+        return kyId;
+    }
+
+    public void setKyId(String kyId) {
+        this.kyId = kyId;
+    }
 
     public String getTianheId() {
         return tianheId;

+ 1 - 0
ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -79,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
 		select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,d.max_duration,
 		       d.company_id,(select dept_name from sys_dept where dept_id = d.company_id) companyName,d.company_logo,d.company_full_name,
+		       d.ky_id,
 			(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
 		from sys_dept d
 		where d.dept_id = #{deptId}

+ 17 - 13
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.system.mapper.SysUserMapper">
 
-    <resultMap type="SysUser" id="SysUserResult">
+    <resultMap type="com.ruoyi.common.core.domain.entity.SysUser" id="SysUserResult">
         <id     property="userId"       column="user_id"      />
         <result property="deptId"       column="dept_id"      />
         <result property="userName"     column="user_name"    />
@@ -37,11 +37,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="roleName"       column="roleName"       />
 		<result property="deptName"  column="dept_name"   />
 		<result property="superiorName"       column="superiorName"       />
-        <association property="dept"    javaType="SysDept"         resultMap="deptResult" />
+		<result property="kyId"       column="ky_id"       />
+        <association property="dept"    javaType="com.ruoyi.common.core.domain.entity.SysUser"         resultMap="deptResult" />
         <collection  property="roles"   javaType="java.util.List"  resultMap="RoleResult" />
     </resultMap>
 
-    <resultMap id="deptResult" type="SysDept">
+    <resultMap id="deptResult" type="com.ruoyi.common.core.domain.entity.SysDept">
         <id     property="deptId"    column="dept_id"     />
         <result property="parentId"  column="parent_id"   />
         <result property="deptName"  column="dept_name"   />
@@ -54,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="companyId"    column="company_id" />
     </resultMap>
 
-    <resultMap id="RoleResult" type="SysRole">
+    <resultMap id="RoleResult" type="com.ruoyi.common.core.domain.entity.SysRole">
         <id     property="roleId"       column="role_id"        />
         <result property="roleName"     column="role_name"      />
         <result property="roleKey"      column="role_key"       />
@@ -67,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
         d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,d.ancestors,d.max_duration,u.open_id,d.company_id,
         r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.superior_id ,su.nick_name superiorName,
-		u.job_number,u.full_job,u.dd_user_id,u.tianhe_id
+		u.job_number,u.full_job,u.dd_user_id,u.tianhe_id,u.ky_id
         from sys_user u
 		    left join sys_dept d on u.dept_id = d.dept_id
 		    left join sys_user_role ur on u.user_id = ur.user_id
@@ -79,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		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,sup.post_id,u.duration,sp.post_name,su.nick_name superiorName,
-			sr.role_id roleId, sr.role_name roleName
+			sr.role_id roleId, sr.role_name roleName, u.ky_id
 		from sys_user u
 		left join sys_dept d on u.dept_id = d.dept_id
 		left join sys_user_post sup on u.user_id = sup.user_id
@@ -155,8 +156,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		</if>
 	</select>
 
-	<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
-	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
+	<select id="selectAllocatedList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult">
+	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time,u.ky_id
 	    from sys_user u
 			 left join sys_dept d on u.dept_id = d.dept_id
 			 left join sys_user_role ur on u.user_id = ur.user_id
@@ -172,7 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		${params.dataScope}
 	</select>
 
-	<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
+	<select id="selectUnallocatedList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult">
 	    select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
 	    from sys_user u
 			 left join sys_dept d on u.dept_id = d.dept_id
@@ -244,6 +245,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="duration != null and duration != ''">duration,</if>
  			<if test="ddUserId != null and ddUserId != ''">dd_user_id,</if>
  			<if test="tianheId != null and tianheId != ''">tianhe_id,</if>
+			<if test="kyId != null and kyId != ''">ky_id,</if>
  			create_time
  		)values(
  			<if test="userId != null and userId != ''">#{userId},</if>
@@ -266,11 +268,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="duration != null and duration != ''">#{duration},</if>
 			<if test="ddUserId != null and ddUserId != ''">#{ddUserId},</if>
 			<if test="tianheId != null and tianheId != ''">#{tianheId},</if>
+ 		    <if test="kyId != null and kyId != ''">#{kyId},</if>
  			sysdate()
  		)
 	</insert>
 
-	<update id="updateUser" parameterType="SysUser">
+	<update id="updateUser" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
  		update sys_user
  		<set>
  			<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
@@ -294,20 +297,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="duration != null and duration != ''">duration=#{duration},</if>
 			<if test="ddUserId != null and ddUserId != ''">dd_user_id=#{ddUserId},</if>
 			<if test="tianheId != null and tianheId != ''">tianhe_id=#{tianheId},</if>
+ 		    <if test="kyId != null">ky_id= #{kyId,jdbcType=VARCHAR},</if>
  			update_time = sysdate()
  		</set>
  		where user_id = #{userId}
 	</update>
 
-	<update id="updateUserStatus" parameterType="SysUser">
+	<update id="updateUserStatus" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
  		update sys_user set status = #{status} where user_id = #{userId}
 	</update>
 
-	<update id="updateUserAvatar" parameterType="SysUser">
+	<update id="updateUserAvatar" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
  		update sys_user set avatar = #{avatar} where user_name = #{userName}
 	</update>
 
-	<update id="resetUserPwd" parameterType="SysUser">
+	<update id="resetUserPwd" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
  		update sys_user set password = #{password} where user_name = #{userName}
 	</update>