<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.zt.modules.log.dao.SysLogLoginDao">
|
<select id="getList" resultType="com.zt.modules.log.model.SysLogLogin">
|
select a.* from sys_log_login a
|
<where>
|
<if test="status!=null">
|
and status=#{status}
|
</if>
|
<if test="status!=null">
|
and CREATOR_NAME like concat('%',#{creatorName},'%')
|
</if>
|
<if test="action == 'all'">
|
and 1 = 1
|
</if>
|
<if test="action == 'xtbmybm'">
|
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 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>
|
<if test="order!=null and order!=''">
|
order by a.CREATE_DATE ${order}
|
</if>
|
<if test="order==null">
|
order by a.CREATE_DATE
|
</if>
|
</where>
|
</select>
|
</mapper>
|