<?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.citygis.web.mapper.TabSqlExecuteMapper">

    <select id="getTabSqlExecuteList" resultType="com.citygis.web.domain.TabSqlExecute"
            parameterType="com.citygis.web.domain.TabSqlExecute">
        select
        "ID","SQL","TABLENAME","EXECUTECOUNT","TOTALTIME","MAXTIMESPAN","FETCHROWCOUNT","CONCURRENTMAX","DBTYPE","INTRANSACTIONCOUNT","ERRORCOUNT","RUNNINGCOUNT","EFFECTEDROWCOUNT","SQLTYPE","SCHEMANAME","CREATE_TIME","SQLID"
        from "LIU_TONG_YI"."TAB_SQL_EXECUTE"
        where IS_DEL = 0
        <if test="sql != null">
            and SQL like concat('%',#{sql},'%')
        </if>

        <if test="startTime != null and endTime != null">
            and CREATE_TIME >= #{startTime}
            and CREATE_TIME &lt;=#{endTime}
        </if>
    </select>

</mapper>
