<?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="cn.superdesk.uniorder.dao.mapper.sys.logger.SysUserOperationLogMapperEx">


    <sql id="queryCriteria">
        AND 1=1
        AND operation_time BETWEEN '2022-05-07' AND '2022-05-07 23:59:59.999999'
        AND user_name = 'yks'
    </sql>
    <select id="queryByDay"
            resultMap="cn.superdesk.uniorder.dao.mapper.sys.logger.SysUserOperationLogMapper.ResultMapWithBLOBs">

        SELECT
        <include refid="cn.superdesk.uniorder.dao.mapper.sys.logger.SysUserOperationLogMapper.Base_Column_List" />
        ,
        <include refid="cn.superdesk.uniorder.dao.mapper.sys.logger.SysUserOperationLogMapper.Blob_Column_List" />
        FROM
            sys_user_operation_log
        <where>
            <include refid="queryCriteria"></include>
        </where>
    </select>

    <select id="countByDay">
        SELECT
            count(1)
        FROM
            sys_user_operation_log
        <where>
            <include refid="queryCriteria"></include>
        </where>
    </select>
</mapper>