| | |
| | | |
| | | <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} |
| | |
| | | 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} |
| | |
| | | <if test="order!=null and order!=''"> |
| | | order by a.CREATE_DATE ${order} |
| | | </if> |
| | | |
| | | <if test="order==null"> |
| | | order by a.CREATE_DATE |
| | | </if> |