fengjin
2022-10-17 783e768b0d8b2956cf5dd10e44a7347772338232
flower_city/src/main/resources/mapper/SysUserMapper.xml
@@ -73,6 +73,8 @@
            transaction_names,
            openid,
            transaction_num,
            (select role_name from automessage_role_management where automessage_role_management.id=role_ids) as roleName,
            (select permission from automessage_role_management where automessage_role_management.id=role_ids) as permission,
            (select organization_name from automessage_organization_chart where automessage_sys_user.department_id=automessage_organization_chart.id) as department_name
        FROM
            automessage_sys_user
@@ -127,20 +129,29 @@
        </where>
    </select>
    <select id="getUserByAccount" parameterType="string"  resultMap="SysUserResult">
        <include refid="selectSysUserVo"/>
        <where>
            <if test="account!=null and account!='' ">
                login_name= #{account}
            </if>
        </where>
    </select>
    <select id="selectListByDepartmentId"  resultMap="SysUserResult">
        <include refid="selectSysUserVo"/>
         <where>
             user_type=2 and status=0
        <if test="list!=null">
            and  department_id in
            <foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
                #{id}
            </foreach>
         </if>
         <if test="classifyIdFront!=null and classifyIdFront!='' and classifyIdAfter!=null and classifyIdAfter!=''">
            and (master_ids like concat('%',#{classifyIdFront}, '%') or master_ids like concat('%',#{classifyIdAfter}, '%'))
         </if>
            user_type=2 and status=0
            <if test="list!=null">
                and  department_id in
                <foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
                    #{id}
                </foreach>
             </if>
             <if test="classifyIdFront!=null and classifyIdFront!='' and classifyIdAfter!=null and classifyIdAfter!=''">
                and (master_ids like concat('%',#{classifyIdFront}, '%') or master_ids like concat('%',#{classifyIdAfter}, '%'))
             </if>
         </where>
         order by transaction_num
@@ -148,7 +159,7 @@
    <insert id="insertConfig" parameterType="com.dg.core.db.gen.entity.SysUser">
        insert into automessage_sys_user (
        insert ignore into automessage_sys_user (
        create_time
        <if test="userId != null and userId != '' ">,user_id</if>
        <if test="loginName != null and loginName != '' ">,login_name</if>