| <?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.SysLogOperationDao"> | 
|   | 
|     <sql id="custom_where"> | 
|         <choose> | 
|             <when test="startCreateTime!=null and endCreateTime!=null"> | 
|                 and a.create_date between #{startCreateTime} and #{endCreateTime} | 
|             </when> | 
|             <when test="startCreateTime!=null"> | 
|                 and a.create_date >= #{startCreateTime} | 
|             </when> | 
|             <when test="endCreateTime!=null"> | 
|                 and a.create_date <= #{endCreateTime} | 
|             </when> | 
|             <otherwise> | 
|             </otherwise> | 
|         </choose> | 
|     </sql> | 
|   | 
|     <select id="getList" resultType="com.zt.modules.log.model.SysLogOperation"> | 
|         select a.* | 
|             from sys_log_operation a | 
|         <where> | 
|             <if test="whereSql!=null"> | 
|                 ${whereSql} | 
|             </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="status != null"> | 
|                 and a.status = ${status} | 
|             </if> | 
|             <if test="startCreateTime!=null and endCreateTime!=null and startCreateTime!=''and endCreateTime!=''"> | 
|                 and a.create_date between #{startCreateTime} and #{endCreateTime} | 
|             </if> | 
|             <if test="startCreateTime!=null and startCreateTime!=''"> | 
|                 and a.create_date >= #{startCreateTime} | 
|             </if> | 
|             <if test="endCreateTime!=null and endCreateTime!=''"> | 
|                 and a.create_date <= #{endCreateTime} | 
|             </if> | 
|             and is_delete = 0 | 
|             ORDER BY a.create_date DESC | 
|         </where> | 
|     </select> | 
|   | 
|     <update id="deleteCondition"> | 
|         <foreach collection="list" item="item" index="index" open="" close="" separator=";"> | 
|         update sys_log_operation | 
|         <set> | 
|             is_delete = 1 | 
|         </set> | 
|         where id = ${item.id} | 
|         </foreach> | 
|     </update> | 
| </mapper> |