<?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.billion.main.da.mapper.DaStationCollectionMapper">
|
|
<resultMap type="DaStationCollection" id="DaStationCollectionResult">
|
<result property="id" column="id" />
|
<result property="sfcCode" column="sfc_code" />
|
<result property="locationCode" column="location_code" />
|
<result property="inboundTime" column="inbound_time" />
|
<result property="outboundTime" column="outbound_time" />
|
<result property="status" column="status" />
|
<result property="collectTime" column="collect_time" />
|
</resultMap>
|
|
<sql id="selectDaStationCollectionVo">
|
select id, sfc_code, location_code, inbound_time, outbound_time, status, collect_time from da_station_collection
|
</sql>
|
|
<select id="selectDaStationCollectionList" parameterType="DaStationCollection" resultMap="DaStationCollectionResult">
|
<include refid="selectDaStationCollectionVo"/>
|
<where>
|
<if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if>
|
<if test="locationCode != null and locationCode != ''"> and location_code = #{locationCode}</if>
|
<if test="inboundTime != null "> and inbound_time = #{inboundTime}</if>
|
<if test="outboundTime != null "> and outbound_time = #{outboundTime}</if>
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="collectTime != null "> and collect_time = #{collectTime}</if>
|
</where>
|
</select>
|
|
<select id="selectDaStationCollectionById" parameterType="Long" resultMap="DaStationCollectionResult">
|
<include refid="selectDaStationCollectionVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertDaStationCollection" parameterType="DaStationCollection" useGeneratedKeys="true" keyProperty="id">
|
insert into da_station_collection
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="sfcCode != null">sfc_code,</if>
|
<if test="locationCode != null">location_code,</if>
|
<if test="inboundTime != null">inbound_time,</if>
|
<if test="outboundTime != null">outbound_time,</if>
|
<if test="status != null">status,</if>
|
<if test="collectTime != null">collect_time,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="sfcCode != null">#{sfcCode},</if>
|
<if test="locationCode != null">#{locationCode},</if>
|
<if test="inboundTime != null">#{inboundTime},</if>
|
<if test="outboundTime != null">#{outboundTime},</if>
|
<if test="status != null">#{status},</if>
|
<if test="collectTime != null">#{collectTime},</if>
|
</trim>
|
</insert>
|
|
<update id="updateDaStationCollection" parameterType="DaStationCollection">
|
update da_station_collection
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="sfcCode != null">sfc_code = #{sfcCode},</if>
|
<if test="locationCode != null">location_code = #{locationCode},</if>
|
<if test="inboundTime != null">inbound_time = #{inboundTime},</if>
|
<if test="outboundTime != null">outbound_time = #{outboundTime},</if>
|
<if test="status != null">status = #{status},</if>
|
<if test="collectTime != null">collect_time = #{collectTime},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteDaStationCollectionById" parameterType="Long">
|
delete from da_station_collection where id = #{id}
|
</delete>
|
|
<delete id="deleteDaStationCollectionByIds" parameterType="String">
|
delete from da_station_collection where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
</mapper>
|