|
|
|
@ -26,6 +26,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
|
<result property="userarea" column="userarea" />
|
|
|
|
|
<result property="nation" column="nation" />
|
|
|
|
|
<result property="birthday" column="birthday" />
|
|
|
|
|
<result property="politics" column="politics" />
|
|
|
|
|
<result property="shemichengdu" column="shemichengdu" />
|
|
|
|
|
<result property="graduate" column="graduate" />
|
|
|
|
|
<result property="startdata" column="startdata" />
|
|
|
|
|
<result property="enddata" column="enddata" />
|
|
|
|
|
<result property="helthy" column="helthy" />
|
|
|
|
|
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
|
|
|
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
|
|
|
|
</resultMap>
|
|
|
|
@ -50,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectUserVo">
|
|
|
|
|
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_time, u.remark,
|
|
|
|
|
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_time, u.remark,userarea, nation, birthday, politics, shemichengdu, graduate, startdata, enddata, helthy,
|
|
|
|
|
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
|
|
|
|
@ -60,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
|
|
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
|
|
|
|
select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, userarea, nation, birthday, politics, shemichengdu, graduate, startdata, enddata, helthy,d.dept_name, d.leader from sys_user u
|
|
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
|
|
where u.del_flag = '0'
|
|
|
|
|
<if test="userId != null and userId != 0">
|
|
|
|
@ -89,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
|
|
select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time
|
|
|
|
|
select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time,userarea, nation, birthday, politics, shemichengdu, graduate, startdata, enddata, helthy
|
|
|
|
|
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
|
|
|
|
@ -106,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
|
|
|
|
select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time
|
|
|
|
|
select distinct u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.status, u.create_time,userarea, nation, birthday, politics, shemichengdu, graduate, startdata, enddata, helthy
|
|
|
|
|
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
|
|
|
|
@ -185,6 +194,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="pwdUpdateDate != null">pwd_update_date = #{pwdUpdateDate},</if>
|
|
|
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
<if test="userarea != null">userarea = #{userarea},</if>
|
|
|
|
|
<if test="nation != null">nation = #{nation},</if>
|
|
|
|
|
<if test="birthday != null">birthday = #{birthday},</if>
|
|
|
|
|
<if test="politics != null">politics = #{politics},</if>
|
|
|
|
|
<if test="shemichengdu != null">shemichengdu = #{shemichengdu},</if>
|
|
|
|
|
<if test="graduate != null">graduate = #{graduate},</if>
|
|
|
|
|
<if test="helthy != null">helthy = #{helthy},</if>
|
|
|
|
|
update_time = sysdate()
|
|
|
|
|
</set>
|
|
|
|
|
where user_id = #{userId}
|
|
|
|
@ -207,6 +223,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="pwdUpdateDate != null">pwd_update_date,</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
|
|
|
<if test="userarea != null">userarea,</if>
|
|
|
|
|
<if test="nation != null">nation,</if>
|
|
|
|
|
<if test="birthday != null">birthday,</if>
|
|
|
|
|
<if test="politics != null">politics,</if>
|
|
|
|
|
<if test="shemichengdu != null">shemichengdu,</if>
|
|
|
|
|
<if test="graduate != null">graduate,</if>
|
|
|
|
|
<if test="helthy != null">helthy,</if>
|
|
|
|
|
create_time
|
|
|
|
|
)values(
|
|
|
|
|
<if test="userId != null and userId != ''">#{userId},</if>
|
|
|
|
@ -224,6 +247,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="pwdUpdateDate != null">#{pwdUpdateDate},</if>
|
|
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
|
|
|
<if test="userarea != null">#{userarea},</if>
|
|
|
|
|
<if test="nation != null">#{nation},</if>
|
|
|
|
|
<if test="birthday != null">#{birthday},</if>
|
|
|
|
|
<if test="politics != null">#{politics},</if>
|
|
|
|
|
<if test="shemichengdu != null">#{shemichengdu},</if>
|
|
|
|
|
<if test="graduate != null">#{graduate},</if>
|
|
|
|
|
<if test="startdata != null">#{startdata},</if>
|
|
|
|
|
<if test="enddata != null">#{enddata},</if>
|
|
|
|
|
<if test="helthy != null">#{helthy},</if>
|
|
|
|
|
sysdate()
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|