| | |
| | | </sql> |
| | | |
| | | <select id="selectNum" parameterType="string" resultType="integer"> |
| | | select count(user_id) from automessage_sys_user |
| | | <where> |
| | | <if test="userType != null and userType != ''"> |
| | | AND user_type=#{userType} |
| | | </if> |
| | | <if test="ids != null"> |
| | | and department_id IN |
| | | <foreach collection="ids" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | <if test="isDivisionHead != null and isDivisionHead != ''"> |
| | | AND is_division_head=#{isDivisionHead} |
| | | </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> |
| | | |
| | | </where> |
| | | SET SESSION group_concat_max_len=10240 |
| | | |
| | | <!-- select count(user_id) from automessage_sys_user--> |
| | | <!-- <where>--> |
| | | <!-- <if test="userType != null and userType != ''">--> |
| | | <!-- AND user_type=#{userType}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="ids != null">--> |
| | | <!-- and department_id IN--> |
| | | <!-- <foreach collection="ids" item="param" open="(" close=")" separator=",">--> |
| | | <!-- #{param}--> |
| | | <!-- </foreach>--> |
| | | <!-- </if>--> |
| | | <!-- <if test="isDivisionHead != null and isDivisionHead != ''">--> |
| | | <!-- AND is_division_head=#{isDivisionHead}--> |
| | | <!-- </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>--> |
| | | |
| | | <!-- </where>--> |
| | | </select> |
| | | |
| | | <select id="queryList" resultMap="SysUserResult"> |