|
@@ -3,7 +3,6 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.zd.system.mapper.SysUserMapper">
|
|
<mapper namespace="com.zd.system.mapper.SysUserMapper">
|
|
|
-
|
|
|
|
|
<resultMap type="com.zd.model.entity.SysUser" id="SysUserResult">
|
|
<resultMap type="com.zd.model.entity.SysUser" id="SysUserResult">
|
|
|
<id property="userId" column="user_id"/>
|
|
<id property="userId" column="user_id"/>
|
|
|
<result property="deptId" column="dept_id"/>
|
|
<result property="deptId" column="dept_id"/>
|
|
@@ -48,8 +47,6 @@
|
|
|
<result property="faceImg" column="face_img"/>
|
|
<result property="faceImg" column="face_img"/>
|
|
|
<result property="className" column="class_name"/>
|
|
<result property="className" column="class_name"/>
|
|
|
<result property="createTimeStr" column="createTimeStr"/>
|
|
<result property="createTimeStr" column="createTimeStr"/>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
<association property="dept" column="dept_id" javaType="com.zd.model.entity.SysDept"
|
|
<association property="dept" column="dept_id" javaType="com.zd.model.entity.SysDept"
|
|
|
resultMap="deptResult"/>
|
|
resultMap="deptResult"/>
|
|
|
<!--<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>-->
|
|
<!--<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>-->
|
|
@@ -229,8 +226,6 @@
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
<select id="selectAllocatedList" parameterType="com.zd.model.entity.SysUser" resultMap="SysUserResult">
|
|
<select id="selectAllocatedList" parameterType="com.zd.model.entity.SysUser" resultMap="SysUserResult">
|
|
|
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.user_type, u.email, u.phonenumber, u.status, u.create_time, d.`dept_name`,
|
|
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.user_type, u.email, u.phonenumber, u.status, u.create_time, d.`dept_name`,
|
|
|
u.card_num,u.wechat_id,u.education,u.nationality,u.addr,u.work_status,u.date_birth
|
|
u.card_num,u.wechat_id,u.education,u.nationality,u.addr,u.work_status,u.date_birth
|
|
@@ -363,7 +358,6 @@
|
|
|
</where>
|
|
</where>
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<select id="noJoinPositionByList" parameterType="com.zd.model.entity.SysUser" resultMap="SysUserResult">
|
|
<select id="noJoinPositionByList" parameterType="com.zd.model.entity.SysUser" resultMap="SysUserResult">
|
|
|
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex,
|
|
select u.user_id, u.dept_id, u.nick_name, u.user_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.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
|
@@ -436,7 +430,6 @@
|
|
|
${params.dataScope}
|
|
${params.dataScope}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<insert id="insertUser" parameterType="com.zd.model.entity.SysUser" useGeneratedKeys="true"
|
|
<insert id="insertUser" parameterType="com.zd.model.entity.SysUser" useGeneratedKeys="true"
|
|
|
keyProperty="userId">
|
|
keyProperty="userId">
|
|
|
insert into sys_user(
|
|
insert into sys_user(
|
|
@@ -457,9 +450,7 @@
|
|
|
<if test="grade != null and grade != ''">grade,</if>
|
|
<if test="grade != null and grade != ''">grade,</if>
|
|
|
<if test="category != null and category != ''">category,</if>
|
|
<if test="category != null and category != ''">category,</if>
|
|
|
<if test="tutorUserId != null and tutorUserId != '' ">tutor_user_id,</if>
|
|
<if test="tutorUserId != null and tutorUserId != '' ">tutor_user_id,</if>
|
|
|
-
|
|
|
|
|
<if test="majorId != null and majorId != ''">major_id,</if>
|
|
<if test="majorId != null and majorId != ''">major_id,</if>
|
|
|
-
|
|
|
|
|
<if test="position != null and position != ''">position,</if>
|
|
<if test="position != null and position != ''">position,</if>
|
|
|
<if test="department != null and department != ''">department,</if>
|
|
<if test="department != null and department != ''">department,</if>
|
|
|
<if test="nature != null and nature != ''">nature,</if>
|
|
<if test="nature != null and nature != ''">nature,</if>
|
|
@@ -489,9 +480,7 @@
|
|
|
<if test="grade != null and grade != ''">#{grade},</if>
|
|
<if test="grade != null and grade != ''">#{grade},</if>
|
|
|
<if test="category != null and category != ''">#{category},</if>
|
|
<if test="category != null and category != ''">#{category},</if>
|
|
|
<if test="tutorUserId != null and tutorUserId != ''">#{tutorUserId},</if>
|
|
<if test="tutorUserId != null and tutorUserId != ''">#{tutorUserId},</if>
|
|
|
-
|
|
|
|
|
<if test="majorId != null and majorId != ''">#{majorId},</if>
|
|
<if test="majorId != null and majorId != ''">#{majorId},</if>
|
|
|
-
|
|
|
|
|
<if test="position != null and position != '' ">#{position},</if>
|
|
<if test="position != null and position != '' ">#{position},</if>
|
|
|
<if test="department != null and department != ''">#{department},</if>
|
|
<if test="department != null and department != ''">#{department},</if>
|
|
|
<if test="nature != null and nature != ''">#{nature},</if>
|
|
<if test="nature != null and nature != ''">#{nature},</if>
|
|
@@ -522,7 +511,6 @@
|
|
|
<if test="loginDate != null">login_date = #{loginDate},</if>
|
|
<if test="loginDate != null">login_date = #{loginDate},</if>
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
|
-
|
|
|
|
|
<if test="userType != null ">user_type = #{userType},</if>
|
|
<if test="userType != null ">user_type = #{userType},</if>
|
|
|
<if test="major != null and major != ''">major = #{major},</if>
|
|
<if test="major != null and major != ''">major = #{major},</if>
|
|
|
<if test="majorId != null">major_id = #{majorId},</if>
|
|
<if test="majorId != null">major_id = #{majorId},</if>
|
|
@@ -562,7 +550,6 @@
|
|
|
<if test="loginDate != null">login_date = #{loginDate},</if>
|
|
<if test="loginDate != null">login_date = #{loginDate},</if>
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
|
-
|
|
|
|
|
<if test="userType != null ">user_type = #{userType},</if>
|
|
<if test="userType != null ">user_type = #{userType},</if>
|
|
|
<if test="major != null and major != ''">major = #{major},</if>
|
|
<if test="major != null and major != ''">major = #{major},</if>
|
|
|
<if test="majorId != null">major_id = #{majorId},</if>
|
|
<if test="majorId != null">major_id = #{majorId},</if>
|
|
@@ -601,7 +588,6 @@
|
|
|
<if test="loginDate != null">login_date = #{loginDate},</if>
|
|
<if test="loginDate != null">login_date = #{loginDate},</if>
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
|
-
|
|
|
|
|
<if test="userType != null ">user_type = #{userType},</if>
|
|
<if test="userType != null ">user_type = #{userType},</if>
|
|
|
<if test="major != null and major != ''">major = #{major},</if>
|
|
<if test="major != null and major != ''">major = #{major},</if>
|
|
|
<if test="majorId != null">major_id = #{majorId},</if>
|
|
<if test="majorId != null">major_id = #{majorId},</if>
|
|
@@ -624,15 +610,11 @@
|
|
|
where user_id = #{userId}
|
|
where user_id = #{userId}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<update id="relieveUserByPosition" parameterType="com.zd.model.entity.SysUser">
|
|
<update id="relieveUserByPosition" parameterType="com.zd.model.entity.SysUser">
|
|
|
update sys_user
|
|
update sys_user
|
|
|
set position = '未定'
|
|
set position = '未定'
|
|
|
where user_id = #{userId}
|
|
where user_id = #{userId}
|
|
|
</update>
|
|
</update>
|
|
|
-<!-- <update id="updateUserStatus" parameterType="com.zd.model.domain.SysUser">-->
|
|
|
|
|
-<!-- update sys_user set status = #{status} where user_id = #{userId}-->
|
|
|
|
|
-<!-- </update>-->
|
|
|
|
|
|
|
|
|
|
<update id="updateUserAvatar" parameterType="com.zd.model.entity.SysUser">
|
|
<update id="updateUserAvatar" parameterType="com.zd.model.entity.SysUser">
|
|
|
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
|
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
|
@@ -735,8 +717,6 @@
|
|
|
|
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
<select id="selectUserListByNotWhite" parameterType="com.zd.model.entity.SysUser" resultMap="SysUserResult">
|
|
<select id="selectUserListByNotWhite" parameterType="com.zd.model.entity.SysUser" resultMap="SysUserResult">
|
|
|
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex,
|
|
select u.user_id, u.dept_id, u.nick_name, u.user_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.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
|
@@ -805,11 +785,11 @@
|
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+
|
|
|
<select id="selectUserInfoByCardNum" resultType="com.zd.model.entity.SysUser">
|
|
<select id="selectUserInfoByCardNum" resultType="com.zd.model.entity.SysUser">
|
|
|
SELECT user_id,nick_name,card_num FROM sys_user u WHERE u.card_num = #{cardNum}
|
|
SELECT user_id,nick_name,card_num FROM sys_user u WHERE u.card_num = #{cardNum}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
-
|
|
|
|
|
<select id="getSafeUserList" parameterType="com.zd.model.entity.SysUser" resultMap="SysUserResult">
|
|
<select id="getSafeUserList" parameterType="com.zd.model.entity.SysUser" resultMap="SysUserResult">
|
|
|
select u.user_id, u.nick_name
|
|
select u.user_id, u.nick_name
|
|
|
from
|
|
from
|
|
@@ -819,5 +799,4 @@
|
|
|
AND FIND_IN_SET(u.user_id, #{safeUserId})
|
|
AND FIND_IN_SET(u.user_id, #{safeUserId})
|
|
|
</if>
|
|
</if>
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
</mapper>
|
|
</mapper>
|