yanghui
2022-10-19 e94a80ae3d9733eb2d6a5d9bcbd50a624f058caa
flower_city/src/main/resources/mapper/SysUserMapper.xml
@@ -75,7 +75,13 @@
                ) AS department_area,
            leisure_state,
            master_ids,
            master_names,
            (SELECT GROUP_CONCAT(classify_name) FROM automessage_classify_administration WHERE id in (SELECT
            substring_index(substring_index(master_ids,',', b.help_topic_id + 1), ',', -1) result
            FROM
            mysql.help_topic b
            where
            b.help_topic_id < (LENGTH(master_ids) - LENGTH(REPLACE(master_ids, ',', '')) + 1))) as master_names,
            transaction_ids,
            transaction_names,
            openid,
@@ -91,6 +97,12 @@
    <select id="selectNum" parameterType="string" resultType="integer">
        select count(user_id) from automessage_sys_user
        <where>
            <if test="userName != null and userName != ''">
                AND user_name like concat('%', #{userName}, '%') or
                (department_id in (SELECT id FROM automessage_organization_chart
                WHERE organization_name like concat('%', #{userName}, '%'))) or
                phonenumber like concat('%', #{userName}, '%')
            </if>
            <if test="userType != null and userType != ''">
                AND user_type=#{userType}
            </if>
@@ -111,9 +123,12 @@
    <select id="selectConfigList" parameterType="string" resultMap="SysUserResult">
        <include refid="selectSysUserVo"/>
        <where>
<!--            <if test="userName != null and userName != ''">-->
<!--                AND user_name like concat('%', #{userName}, '%')-->
<!--            </if>-->
            <if test="userName != null and userName != ''">
                AND user_name like concat('%', #{userName}, '%') or
                (department_id in (SELECT id FROM automessage_organization_chart
                WHERE organization_name like concat('%', #{userName}, '%'))) or
                phonenumber like concat('%', #{userName}, '%')
            </if>
            <if test="userType != null and userType != ''">
                AND user_type=#{userType}
            </if>