SysOperLogMapper.xml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.system.mapper.SysOperLogMapper">
  6. <select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
  7. <include refid="selectOperLogVo"/>
  8. <where>
  9. <if test="title != null and title != ''">
  10. AND title like concat('%', #{title}, '%')
  11. </if>
  12. <if test="businessType != null and businessType != ''">
  13. AND business_type = #{businessType}
  14. </if>
  15. <if test="businessTypes != null and businessTypes.length > 0">
  16. AND business_type in
  17. <foreach collection="businessTypes" item="businessType" open="(" separator="," close=")">
  18. #{businessType}
  19. </foreach>
  20. </if>
  21. <if test="status != null">
  22. AND status = #{status}
  23. </if>
  24. <if test="operName != null and operName != ''">
  25. AND oper_name like concat('%', #{operName}, '%')
  26. </if>
  27. <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
  28. and date_format(oper_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
  29. </if>
  30. <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
  31. and date_format(oper_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
  32. </if>
  33. </where>
  34. order by oper_id desc
  35. </select>
  36. </mapper>