Blame view

ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml 1.42 KB
cee572f2   RuoYi   若依 3.0
1
2
3
4
5
6
  <?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.ruoyi.system.mapper.SysOperLogMapper">

  

cee572f2   RuoYi   若依 3.0
7
8
9
10
11
12
13
14
15
16
17
18
19
  	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">

  		<include refid="selectOperLogVo"/>

  		<where>

  			<if test="title != null and title != ''">

  				AND title like concat('%', #{title}, '%')

  			</if>

  			<if test="businessType != null and businessType != ''">

  				AND business_type = #{businessType}

  			</if>

  			<if test="businessTypes != null and businessTypes.length > 0">

  			    AND business_type in

  			    <foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">

  		 			#{businessType}

7dad85a9   YunaiV   梳理操作日志表,提交~
20
  		        </foreach>

cee572f2   RuoYi   若依 3.0
21
22
23
24
25
26
27
  			</if>

  			<if test="status != null">

  				AND status = #{status}

  			</if>

  			<if test="operName != null and operName != ''">

  				AND oper_name like concat('%', #{operName}, '%')

  			</if>

ef92ad4d   RuoYi   支持get请求映射params参数
28
29
  			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->

  				and date_format(oper_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')

cee572f2   RuoYi   若依 3.0
30
  			</if>

ef92ad4d   RuoYi   支持get请求映射params参数
31
32
  			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->

  				and date_format(oper_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')

cee572f2   RuoYi   若依 3.0
33
34
35
36
  			</if>

  		</where>

  		order by oper_id desc

  	</select>

cee572f2   RuoYi   若依 3.0
37
  

7dad85a9   YunaiV   梳理操作日志表,提交~
38
39
  

  </mapper>