|
@@ -147,7 +147,51 @@
|
|
<!-- 数据范围过滤 -->
|
|
<!-- 数据范围过滤 -->
|
|
${params.dataScope}
|
|
${params.dataScope}
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
|
|
+ <select id="selectTenantList" parameterType="SysUser" 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_id,
|
|
|
|
+ u.usage_code,
|
|
|
|
+ u.remark FROM sys_user u
|
|
|
|
+ WHERE u.del_flag = '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>
|
|
<!-- 员工列表 selectEmployeeList -->
|
|
<!-- 员工列表 selectEmployeeList -->
|
|
<select id="selectEmployeeList" parameterType="SysUser" resultMap="SysUserResult">
|
|
<select id="selectEmployeeList" parameterType="SysUser" resultMap="SysUserResult">
|
|
SELECT
|
|
SELECT
|
|
@@ -232,6 +276,7 @@
|
|
<if test="nickName != null and nickName != ''">
|
|
<if test="nickName != null and nickName != ''">
|
|
AND u.nick_name LIKE concat('%', #{nickName}, '%')
|
|
AND u.nick_name LIKE concat('%', #{nickName}, '%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="tenantId != null and tenantId != 0"> AND u.tenant_id = #{tenantId}</if>
|
|
<!-- 数据范围过滤 -->
|
|
<!-- 数据范围过滤 -->
|
|
${params.dataScope}
|
|
${params.dataScope}
|
|
</select>
|
|
</select>
|