|
|
|
@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="deptId" column="dept_id" /> |
|
|
|
<result property="orgId" column="org_id" /> |
|
|
|
<result property="openId" column="open_id" /> |
|
|
|
<result property="unionId" column="union_id" /> |
|
|
|
<result property="userName" column="user_name" /> |
|
|
|
<result property="nickName" column="nick_name" /> |
|
|
|
<result property="email" column="email" /> |
|
|
|
@ -50,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
<sql id="selectUserVo"> |
|
|
|
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,u.org_id, u.open_id, |
|
|
|
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.org_id, u.open_id, u.union_id, |
|
|
|
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, |
|
|
|
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status |
|
|
|
from sys_user u |
|
|
|
@ -61,7 +62,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
|
|
|
|
<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, u.org_id, u.open_id, d.dept_name, d.leader |
|
|
|
u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.org_id, u.open_id, d.dept_name, d.leader, |
|
|
|
u.union_id |
|
|
|
from sys_user u |
|
|
|
left join sys_dept d on u.dept_id = d.dept_id |
|
|
|
where u.del_flag = '0' |
|
|
|
@ -172,6 +174,7 @@ 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="unionId != null and unionId != ''">union_id,</if> |
|
|
|
create_time |
|
|
|
)values( |
|
|
|
<if test="userId != null and userId != ''">#{userId},</if> |
|
|
|
@ -188,6 +191,7 @@ 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="unionId != null and unionId != ''">#{unionId},</if> |
|
|
|
sysdate() |
|
|
|
) |
|
|
|
</insert> |
|
|
|
@ -209,6 +213,7 @@ 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="unionId != null and unionId != ''">union_id = #{unionId},</if> |
|
|
|
update_time = sysdate() |
|
|
|
</set> |
|
|
|
where user_id = #{userId} |
|
|
|
@ -240,10 +245,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
update sys_user set open_id = null where user_id = #{userId} |
|
|
|
</update> |
|
|
|
<update id="deleteOpenId"> |
|
|
|
update sys_user set open_id = null where open_id = #{openId} |
|
|
|
update sys_user set open_id = null, union_id = null where open_id = #{openId} |
|
|
|
</update> |
|
|
|
<update id="relevanceUserAndOpenId"> |
|
|
|
update sys_user set open_id = #{openId} where user_id = #{userId} |
|
|
|
update sys_user set open_id = #{openId}, union_id = #{unionId} where user_id = #{userId} |
|
|
|
</update> |
|
|
|
|
|
|
|
<select id="getGzhOpenIdByUnionId" resultType="java.lang.String"> |
|
|
|
select open_id from srsp_new.ums_gzh_info where union_id = #{unionId} and del_status = '0' |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |