|
|
@@ -38,7 +38,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="deptName" column="dept_name" />
|
|
|
<result property="superiorName" column="superiorName" />
|
|
|
<result property="kyId" column="ky_id" />
|
|
|
- <association property="dept" javaType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="deptResult" />
|
|
|
+ <result property="kySuperId" column="ky_super_id" />
|
|
|
+ <association property="dept" javaType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="deptResult" />
|
|
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
|
|
</resultMap>
|
|
|
|
|
|
@@ -68,7 +69,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.ky_id
|
|
|
+ u.job_number,u.full_job,u.dd_user_id,u.tianhe_id,u.ky_id,u.ky_super_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
|
|
|
@@ -80,7 +81,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, u.ky_id
|
|
|
+ sr.role_id roleId, sr.role_name roleName, u.ky_id, u.ky_super_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
|
|
|
@@ -157,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<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
|
|
|
+ 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,u.ky_super_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
|
|
|
@@ -246,6 +247,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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>
|
|
|
+ <if test="kySuperId != null and kySuperId != ''">ky_super_id,</if>
|
|
|
create_time
|
|
|
)values(
|
|
|
<if test="userId != null and userId != ''">#{userId},</if>
|
|
|
@@ -269,6 +271,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="ddUserId != null and ddUserId != ''">#{ddUserId},</if>
|
|
|
<if test="tianheId != null and tianheId != ''">#{tianheId},</if>
|
|
|
<if test="kyId != null and kyId != ''">#{kyId},</if>
|
|
|
+ <if test="kySuperId != null and kySuperId != ''">#{kySuperId},</if>
|
|
|
sysdate()
|
|
|
)
|
|
|
</insert>
|
|
|
@@ -298,6 +301,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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>
|
|
|
+ <if test="kySuperId != null">ky_super_id= #{kySuperId,jdbcType=VARCHAR},</if>
|
|
|
update_time = sysdate()
|
|
|
</set>
|
|
|
where user_id = #{userId}
|
|
|
@@ -401,4 +405,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<include refid="selectUserVo"/>
|
|
|
where u.dept_id = #{deptId} and u.del_flag = '0'
|
|
|
</select>
|
|
|
+ <select id="selectByKyId" resultMap="SysUserResult">
|
|
|
+ <include refid="selectUserVo"/>
|
|
|
+ where u.ky_id = #{kyId} and u.del_flag = '0'
|
|
|
+ </select>
|
|
|
</mapper>
|