lin
2024-04-16 2b1a74f4faa5a00a294bdc6a6d956c2e009cf467
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -74,7 +74,32 @@
    </select>
    <select id="exportUser" resultType="org.springblade.modules.system.excel.UserExcel">
        SELECT id, tenant_id, user_type, account, name, real_name, email, phone, birthday, role_id, dept_id, post_id FROM blade_user ${ew.customSqlSegment}
        SELECT id,
               tenant_id,
               user_type,
               account,
               name,
               real_name,
               email,
               phone,
               birthday,
               role_id,
               dept_id,
               post_id
        FROM blade_user ${ew.customSqlSegment}
        <if test="deptIdList!=null and deptIdList.size>0">
            and id in (
            SELECT
            user_id
            FROM
            blade_user_dept
            WHERE
            dept_id IN
            <foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
            )
        </if>
    </select>
    <!--按条件查询用户信息-->
@@ -108,7 +133,7 @@
    <!--根据手机号查询对应账号和手机号的用户信息-->
    <select id="getUserListByPhoneOrAccount" resultType="org.springblade.modules.system.entity.User">
        SELECT * FROM blade_user where is_deleted = 0
        and (account = #{phoneNumber} or phone = #{phoneNumber})
        and account = #{phoneNumber}
    </select>
    <!--用户详情map-->