You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
2.0 KiB
59 lines
2.0 KiB
<?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.df.mapper.BsSgcDfGzscMapper">
|
|
|
|
<sql id="info">
|
|
select sd.id,sd. dike_code,sd. dike_name, sd.file,
|
|
sj.adcd
|
|
from bs_sgc_df_gzsc sd
|
|
left join att_dike_base sj on sd.dike_code = sj.dike_CODE
|
|
|
|
</sql>
|
|
|
|
<resultMap id="col" type="BsSgcDfGzsc">
|
|
<id property="id" column="id"/>
|
|
<result property="dikeCode" column="dike_code"/>
|
|
<result property="dikeName" column="dike_name"/>
|
|
<result property="file" column="file"/>
|
|
<result property="adcd" column="adcd"/>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="getList" resultMap="col">
|
|
<bind name="pageNum" value="(pageNum-1)*pageSize"></bind>
|
|
<include refid="info"></include>
|
|
<where>
|
|
<if test="dikeName!=null and dikeName!=''">
|
|
and sj.dike_NAME LIKE concat('%',#{dikeName},'%')
|
|
</if>
|
|
<if test="dikeCode != null and dikeCode != ''">
|
|
and sj.dike_CODE = #{dikeCode}
|
|
</if>
|
|
<if test="adcd!=null and adcd !=''">
|
|
and sj.adcd like concat(#{adcd},'%')
|
|
</if>
|
|
and sj.EXPR_DATE is null
|
|
</where>
|
|
order by sd.create_time desc LIMIT #{pageNum},#{pageSize};
|
|
</select>
|
|
|
|
<select id="getCount" resultMap="col">
|
|
<bind name="pageNum" value="(pageNum-1)*pageSize"></bind>
|
|
<include refid="info"></include>
|
|
<where>
|
|
<if test="dikeName!=null and dikeName!=''">
|
|
and sj.dike_NAME LIKE concat('%',#{dikeName},'%')
|
|
</if>
|
|
<if test="dikeCode != null and dikeCode != ''">
|
|
and sj.dike_CODE = #{dikeCode}
|
|
</if>
|
|
<if test="adcd!=null and adcd !=''">
|
|
and sj.adcd like concat(#{adcd},'%')
|
|
</if>
|
|
and sj.EXPR_DATE is null
|
|
</where>
|
|
</select>
|
|
</mapper>
|
|
|