5 changed files with 52 additions and 3 deletions
@ -0,0 +1,32 @@ |
|||
<?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.kms.yg.sz.mapper.BsSgcSzBzbpMapper"> |
|||
|
|||
|
|||
<resultMap type="com.kms.yg.sz.domain.BsSgcSzBzbp" id="Result"> |
|||
<id property="id" column="id" /> |
|||
<result property="sluiceName" column="sluice_name" /> |
|||
<result property="adcd" column="adcd" /> |
|||
<result property="number" column="number" /> |
|||
|
|||
</resultMap> |
|||
|
|||
<select id="selectList1" resultMap="Result"> |
|||
<bind name="pageNum" value="(pageNum-1)*pageSize"></bind> |
|||
SELECT sluice_name, adcd, COUNT(1) number |
|||
FROM bs_sgc_sz_bzbp |
|||
<where> |
|||
<if test="sluiceName != null and sluiceName != ''"> |
|||
sluice_name like concat('%', #{sluiceName}, '%') |
|||
</if> |
|||
<if test="adcd != null and adcd != ''"> |
|||
and adcd = #{adcd} |
|||
</if> |
|||
</where> |
|||
GROUP BY sluice_code |
|||
ORDER BY create_time DESC |
|||
LIMIT #{pageNum}, #{pageSize} |
|||
</select> |
|||
</mapper> |
Loading…
Reference in new issue