<?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.qmth.sop.business.mapper.SysLogMapper">

    <select id="page" resultType="com.qmth.sop.business.bean.result.SysLogResult">
        SELECT
            content, create_time AS createTime
        FROM
            sys_log
        <where>
            <if test="startTime != null">
                AND create_time > #{startTime}
            </if>
            <if test="endTime != null">
                AND #{endTime} > create_time
            </if>
            <if test="content != null and content != ''">
                AND content LIKE CONCAT('%',#{content},'%')
            </if>
        </where>
        ORDER BY create_time DESC
    </select>
</mapper>
