<?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.yiboshi.science.dao.ComBatchDAO"> <sql id="allColumns"> t.id as id, t.log_level as logLevel, t.short_title as shortTitle, t.ipaddress as ipaddress, t.customer_id as customerId, t.pageurl as pageurl, t.referrerurl as referrerurl, t.message as message, t.created as created </sql> <select id="getListByPage" resultType="com.yiboshi.science.param.dto.ComBatchDTO"> select * from com_batch <where> ${ew.sqlSegment} </where> ORDER BY year desc, batch desc </select> <select id="getMaxBatch" resultType="java.lang.Integer"> select ifnull(max(batch), 0) from com_batch where year = #{year} and proj_type = #{projType} </select> <select id="getCurrentYearBatchByType" resultType="com.yiboshi.science.param.dto.ComBatchDTO"> select * from com_batch where proj_type = #{projType} order by year desc, batch desc limit 1 </select> <select id="getCurrentYearBatch" resultType="com.yiboshi.science.param.dto.ComBatchDTO"> select * from com_batch order by year desc, batch desc limit 1 </select> </mapper>