jinlin
2024-02-21 b27d06b8f0b805efd16e28fd80a57a0ed8a053ce
zt/core/src/main/resources/mapper/log/SysLogLoginDao.xml
@@ -3,11 +3,7 @@
<mapper namespace="com.zt.modules.log.dao.SysLogLoginDao">
    <select id="getList" resultType="com.zt.modules.log.model.SysLogLogin">
        select * from (
            select a.*
                ,(SELECT replace(GROUP_CONCAT(aa.name),',',';') FROM sys_role aa,sys_role_user bb WHERE aa.id=bb.role_id AND bb.user_id = a.creator) AS role_names
            from sys_log_login a
        ) a
            select a.* from sys_log_login a
        <where>
            <if test="status!=null">
              and  status=#{status}
@@ -19,10 +15,12 @@
                and 1 = 1
            </if>
            <if test="action == 'xtbmybm'">
                and role_names NOT LIKE '%xtgly%'  OR role_names NOT LIKE '%xtsjy%'
                and a.creator not in (select user_id from sys_role_user
                where role_id in (select id from sys_role where code in ('xtglybm','xtbmybm','xtsjybm')))
            </if>
            <if test="action == 'xtsjybm'">
                and role_names LIKE '%xtgly%'  OR role_names LIKE '%xtsjy%'
                and a.creator in (select user_id from sys_role_user
                where role_id in (select id from sys_role where code in ('xtglybm','xtbmybm')))
            </if>
            <if test="action == 'other'">
                and a.CREATOR = ${currentUserId}
@@ -30,7 +28,6 @@
            <if test="order!=null and order!=''">
                order by a.CREATE_DATE  ${order}
            </if>
            <if test="order==null">
                order by a.CREATE_DATE
            </if>