|
@@ -91,6 +91,54 @@
|
|
<select id="getUserByCode" parameterType="SysUser" resultMap="SysUserResult">
|
|
<select id="getUserByCode" parameterType="SysUser" resultMap="SysUserResult">
|
|
SELECT * FROM sys_user WHERE del_flag = 0 AND user_name = #{userName}
|
|
SELECT * FROM sys_user WHERE del_flag = 0 AND user_name = #{userName}
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="selectNotAddList" resultMap="SysUserResult">
|
|
|
|
+ SELECT distinct u.user_id,
|
|
|
|
+ u.nick_name,
|
|
|
|
+ u.user_name,
|
|
|
|
+ u.email,
|
|
|
|
+ u.avatar,
|
|
|
|
+ u.phone_number,
|
|
|
|
+ u.sex,
|
|
|
|
+ u.status,
|
|
|
|
+ u.del_flag,
|
|
|
|
+ u.login_ip,
|
|
|
|
+ u.login_date,
|
|
|
|
+ u.create_by,
|
|
|
|
+ u.create_time,
|
|
|
|
+ u.usage_company_id,
|
|
|
|
+ u.usage_company_name,
|
|
|
|
+ u.contract_company_id,
|
|
|
|
+ u.contract_company_name,
|
|
|
|
+ u.remark FROM sys_user u left join sys_dept_user d on u.user_id = d.user_id
|
|
|
|
+ WHERE u.del_flag = '0' and d.deleted = 0 and u.user_id not in
|
|
|
|
+ (select user_id from biz_package_resource_group_detail where deleted = 0)
|
|
|
|
+ <if test="userId != null and userId != 0">
|
|
|
|
+ AND u.user_id = #{userId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="tenantId != null and tenantId != 0">
|
|
|
|
+ AND u.tenant_id = #{tenantId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="deptId != null and deptId != 0">
|
|
|
|
+ AND d.dept_id = #{deptId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userName != null and userName != ''">
|
|
|
|
+ AND u.user_name LIKE concat('%', #{userName}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="nickName != null and nickName != ''">
|
|
|
|
+ AND u.nick_name LIKE concat('%', #{nickName}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <if test="status != null and status != ''">
|
|
|
|
+ AND u.status = #{status}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="userType != null and userType != ''">
|
|
|
|
+ AND u.user_type = #{userType}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="phoneNumber != null and phoneNumber != ''">
|
|
|
|
+ AND u.phone_number LIKE concat('%', #{phoneNumber}, '%')
|
|
|
|
+ </if>
|
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
|
+ ${params.dataScope}
|
|
|
|
+ </select>
|
|
|
|
|
|
<!-- 用户列表 selectUserList -->
|
|
<!-- 用户列表 selectUserList -->
|
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|