You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
3.5 KiB
130 lines
3.5 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ccsens.tall.persist.dao.SysUserDao">
|
|
|
|
|
|
|
|
<update id="replaceAuth" parameterType="java.util.Map">
|
|
update
|
|
t_sys_auth
|
|
set
|
|
user_id = #{newUserId}
|
|
where
|
|
user_id = #{oldUserId}
|
|
</update>
|
|
|
|
<update id="replaceAttention" parameterType="java.util.Map">
|
|
update
|
|
t_sys_user_attention
|
|
set
|
|
user_id = #{newUserId}
|
|
where
|
|
user_id = #{oldUserId}
|
|
</update>
|
|
|
|
<update id="replaceBalance" parameterType="java.util.Map">
|
|
update
|
|
t_sys_balance_log
|
|
set
|
|
user_id = #{newUserId}
|
|
where
|
|
user_id = #{oldUserId}
|
|
</update>
|
|
|
|
<update id="replaceProject" parameterType="java.util.Map">
|
|
update
|
|
t_sys_project
|
|
set
|
|
creator_id = #{newUserId}
|
|
where
|
|
creator_id = #{oldUserId}
|
|
</update>
|
|
|
|
<update id="replaceMember" parameterType="java.util.Map">
|
|
update
|
|
t_pro_member
|
|
set
|
|
user_id = #{newUserId}
|
|
where
|
|
user_id = #{oldUserId}
|
|
</update>
|
|
|
|
<update id="replaceDeliverPostLog" parameterType="java.util.Map">
|
|
update
|
|
t_pro_task_deliver_post_log
|
|
set
|
|
user_id = #{newUserId}
|
|
where
|
|
user_id = #{oldUserId}
|
|
</update>
|
|
|
|
<update id="replaceProLog" parameterType="java.util.Map">
|
|
update
|
|
t_pro_log
|
|
set
|
|
user_id = #{newUserId}
|
|
where
|
|
user_id = #{oldUserId}
|
|
</update>
|
|
|
|
<update id="replaceComment" parameterType="java.util.Map">
|
|
update
|
|
t_pro_task_comment
|
|
set
|
|
user_id = #{newUserId}
|
|
where
|
|
user_id = #{oldUserId}
|
|
</update>
|
|
|
|
<select id="getUserNameByUserId" parameterType="java.util.Map" resultType="java.lang.String">
|
|
SELECT
|
|
IF( u.nickname = '', a.identifier, u.nickname ) AS userName
|
|
FROM
|
|
t_sys_user u
|
|
LEFT JOIN t_sys_auth a ON u.id = a.user_id
|
|
AND a.identify_type = 3
|
|
WHERE
|
|
u.rec_status = 0
|
|
and
|
|
a.rec_status = 0
|
|
and
|
|
u.id = #{userId}
|
|
limit 1
|
|
</select>
|
|
<select id="getUserInfoByUserId" resultType="com.ccsens.tall.bean.vo.UserVo$UserInfo">
|
|
SELECT
|
|
u.id,
|
|
IF( u.nickname = '', a.identifier, u.nickname ) AS nickname,
|
|
u.avatar_url as avatarUrl
|
|
FROM
|
|
t_sys_user u
|
|
LEFT JOIN t_sys_auth a ON u.id = a.user_id
|
|
AND a.identify_type = 3
|
|
WHERE
|
|
u.rec_status = 0
|
|
and
|
|
a.rec_status = 0
|
|
and
|
|
u.id = #{userId}
|
|
limit 1
|
|
</select>
|
|
<select id="listUserInfos" resultType="com.ccsens.tall.bean.vo.UserVo$UserInfo">
|
|
SELECT
|
|
u.id,
|
|
IF( u.nickname = '', a.identifier, u.nickname ) AS nickname,
|
|
u.avatar_url as avatarUrl
|
|
FROM
|
|
t_sys_user u
|
|
LEFT JOIN t_sys_auth a ON u.id = a.user_id
|
|
AND a.identify_type = 3
|
|
WHERE
|
|
u.rec_status = 0
|
|
and
|
|
a.rec_status = 0
|
|
and
|
|
u.id in
|
|
<foreach collection="Array" item="item" separator="," open="(" close=")">
|
|
#{item}
|
|
</foreach>
|
|
</select>
|
|
</mapper>
|