|
@@ -24,9 +24,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="remark" column="remark" />
|
|
<result property="remark" column="remark" />
|
|
<result property="tenantId" column="tenant_id" />
|
|
<result property="tenantId" column="tenant_id" />
|
|
|
|
+ <result property="jobNumber" column="job_number" />
|
|
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
|
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
|
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
|
- </resultMap>
|
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
|
<resultMap id="deptResult" type="SysDept">
|
|
<resultMap id="deptResult" type="SysDept">
|
|
<id property="deptId" column="dept_id"/>
|
|
<id property="deptId" column="dept_id"/>
|
|
@@ -87,11 +88,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
left join sys_user_role ur on u.user_id = ur.user_id
|
|
left join sys_user_role ur on u.user_id = ur.user_id
|
|
left join sys_role r on r.role_id = ur.role_id
|
|
left join sys_role r on r.role_id = ur.role_id
|
|
</sql>
|
|
</sql>
|
|
-
|
|
|
|
- <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,
|
|
|
|
|
|
+
|
|
|
|
+ <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, d.dept_name, d.leader_id,
|
|
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader_id,
|
|
- d.director_id, d.type
|
|
|
|
|
|
+ d.director_id, d.type,u.job_number
|
|
from
|
|
from
|
|
sys_user u
|
|
sys_user u
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
@@ -99,6 +101,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="userId != null and userId != 0">
|
|
<if test="userId != null and userId != 0">
|
|
AND u.user_id = #{userId}
|
|
AND u.user_id = #{userId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="jobNumber != null and jobNumber != 0">
|
|
|
|
+ AND u.job_number = #{jobNumber}
|
|
|
|
+ </if>
|
|
<if test="userName != null and userName != ''">
|
|
<if test="userName != null and userName != ''">
|
|
AND u.user_name like concat('%', #{userName}, '%')
|
|
AND u.user_name like concat('%', #{userName}, '%')
|
|
</if>
|
|
</if>
|
|
@@ -205,6 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
|
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
|
<if test="userType != null and userType != ''">user_type,</if>
|
|
<if test="userType != null and userType != ''">user_type,</if>
|
|
|
|
+ <if test="jobNumber != null and jobNumber != ''">job_number,</if>
|
|
create_time
|
|
create_time
|
|
)values(
|
|
)values(
|
|
<if test="userId != null and userId != ''">#{userId},</if>
|
|
<if test="userId != null and userId != ''">#{userId},</if>
|
|
@@ -221,6 +227,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
|
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
|
<if test="userType != null and userType != ''">#{userType},</if>
|
|
<if test="userType != null and userType != ''">#{userType},</if>
|
|
|
|
+ <if test="jobNumber != null and jobNumber != ''">#{jobNumber},</if>
|
|
sysdate()
|
|
sysdate()
|
|
)
|
|
)
|
|
</insert>
|
|
</insert>
|
|
@@ -243,6 +250,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
|
|
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
|
|
<if test="userType != null and userType != ''">user_type = #{userType},</if>
|
|
<if test="userType != null and userType != ''">user_type = #{userType},</if>
|
|
|
|
+ <if test="jobNumber != null and jobNumber != ''">job_number = #{jobNumber},</if>
|
|
update_time = sysdate()
|
|
update_time = sysdate()
|
|
</set>
|
|
</set>
|
|
where user_id = #{userId}
|
|
where user_id = #{userId}
|