Newer
Older
huludao / src / main / resources / mapper / RiverManage / RiverBusinessPicsDao.xml
<?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.newfiber.api.mobile.dao.RiverBusinessPicsDao">
	
	<!-- 可根据自己的需求,是否要使用 -->
    <resultMap type="com.newfiber.api.mobile.model.domain.RiverBusinessPics" id="riverBusinessPicsMap">
            <result property="serial" column="Serial"/>
            <result property="riverPicsNo" column="River_Pics_No"/>
            <result property="riverPicsName" column="River_Pics_Name"/>
            <result property="riverPicsAddress" column="River_Pics_Address"/>
            <result property="createUserNo" column="Create_User_No"/>
            <result property="createTime" column="Create_Time"/>
        </resultMap>
    
	<!-- 通用查询结果列 -->
	<sql id="Base_Column_List">
			Serial,
			River_Pics_No,
			River_Pics_Name,
			River_Pics_Address,
			Create_User_No,
			Create_Time
		</sql>
	
	<!-- 获取关于河道信息的图片列表 -->
	<select id="queryList" resultType="com.newfiber.api.mobile.model.domain.RiverBusinessPics">
		select <include refid="Base_Column_List" /> 
		from river_business_pics
        <choose>
            <when test="sidx != null and sidx.trim() != ''">
                order by ${sidx} ${order}
            </when>
			<otherwise>
                order by Serial desc
			</otherwise>
        </choose>
	</select>

	<!-- 获取关于巡查信息的图片列表 -->
	<select id="queryListByPicsNo" resultType="com.newfiber.api.mobile.model.domain.RiverBusinessPics" parameterType="java.lang.String">
		select <include refid="Base_Column_List" />
		from river_business_pics
		where River_Pics_No = #{riverPicsNo,jdbcType=VARCHAR}
	</select>

	<!-- 获取关于巡查信息的图片列表(查询巡查流程所有图片) -->
	<select id="queryListByPicsNoList" resultType="com.newfiber.api.mobile.model.domain.RiverBusinessPics" parameterType="java.util.List">
		select <include refid="Base_Column_List" />
		from river_business_pics
		where River_Pics_No in
		<foreach collection="riverPicsList" index="index" item="item" open="(" separator="," close=")">
			#{item}
		</foreach>
	</select>
	
</mapper>