<?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.mzl.flower.mapper.log.OperationRecordMapper">
|
|
<select id="queryPage" resultType="com.mzl.flower.dto.response.log.OperationRecordVO">
|
select t.* , u.nick_name createName from t_operation_record t
|
LEFT JOIN t_user u ON t.create_by = u.id
|
where t.deleted= 0
|
<if test="dto.createName != null and dto.createName != ''">
|
and u.nick_name like concat('%', #{dto.createName}, '%')
|
</if>
|
<if test="dto.module != null and dto.module != ''">
|
and t.module = #{dto.module}
|
</if>
|
<if test="dto.function != null and dto.function != ''">
|
and t.function like concat('%', #{dto.function}, '%')
|
</if>
|
<if test="dto.content != null and dto.content != ''">
|
and t.content like concat('%', #{dto.content}, '%')
|
</if>
|
<if test="dto.createDateBeginStr!=null ">
|
AND DATE_FORMAT(t.create_time, '%Y-%m-%d') >= #{dto.createDateBeginStr}
|
</if>
|
<if test="dto.createDateEndStr!=null ">
|
AND DATE_FORMAT(t.create_time, '%Y-%m-%d') <= #{dto.createDateEndStr}
|
</if>
|
order by t.create_time desc
|
</select>
|
</mapper>
|