liusheng
2 天以前 da026a34bcc97b2eb49607a3b02d94d8f683f997
ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml
@@ -37,32 +37,34 @@
   <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 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}
              </foreach>
         </if>
         <if test="status != null">
            AND status = #{status}
         </if>
         <if test="operName != null and operName != ''">
            AND oper_name like concat('%', #{operName}, '%')
         </if>
         <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
            and date_format(oper_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
         </if>
         <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
            and date_format(oper_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
         </if>
      </where>
      where 1=1
      <if test="orgid != null and orgid != ''">
         AND orgid = #{orgid}
      </if>
      <if test="title != null and title != ''">
         AND title like concat('%', #{title}, '%')
      </if>
      <if test="businessType != null">
         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}
         </foreach>
      </if>
      <if test="status != null">
         AND status = #{status}
      </if>
      <if test="operName != null and operName != ''">
         AND oper_name like concat('%', #{operName}, '%')
      </if>
      <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
         and date_format(oper_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
      </if>
      <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
         and date_format(oper_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
      </if>
      order by oper_id desc
   </select>