123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- <?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.miniapp.bus.mapper.BkDestinationRecordMapper">
-
- <resultMap type="BkDestinationRecord" id="BkDestinationRecordResult">
- <result property="id" column="id" />
- <result property="processId" column="process_id" />
- <result property="outTime" column="out_time" />
- <result property="outPic" column="out_pic" />
- <result property="outLocation" column="out_location" />
- <result property="destinationTime" column="destination_time" />
- <result property="destinationPic" column="destination_pic" />
- <result property="destinationLocation" column="destination_location" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="recordStatus" column="record_status" />
- <result property="remark" column="remark" />
- <result property="outAddress" column="out_address" />
- <result property="destinationAddress" column="destination_address" />
- </resultMap>
- <sql id="selectBkDestinationRecordVo">
- select id, process_id, out_time, out_pic, out_location, destination_time, destination_pic, destination_location, create_by, create_time, update_by,record_status, update_time, remark,out_address,destination_address from bk_destination_record
- </sql>
- <select id="selectBkDestinationRecordList" parameterType="BkDestinationRecord" resultMap="BkDestinationRecordResult">
- <include refid="selectBkDestinationRecordVo"/>
- <where>
- <if test="processId != null "> and process_id = #{processId}</if>
- <if test="outTime != null "> and out_time = #{outTime}</if>
- <if test="recordStatus != null "> and record_status = #{recordStatus}</if>
- <if test="outPic != null and outPic != ''"> and out_pic = #{outPic}</if>
- <if test="outLocation != null and outLocation != ''"> and out_location = #{outLocation}</if>
- <if test="destinationTime != null "> and destination_time = #{destinationTime}</if>
- <if test="destinationPic != null and destinationPic != ''"> and destination_pic = #{destinationPic}</if>
- <if test="destinationLocation != null and destinationLocation != ''"> and destination_location = #{destinationLocation}</if>
- </where>
- </select>
-
- <select id="selectBkDestinationRecordById" parameterType="Long" resultMap="BkDestinationRecordResult">
- <include refid="selectBkDestinationRecordVo"/>
- where id = #{id}
- </select>
- <select id="selectBkDestinationRecordByprocessId" parameterType="Long" resultMap="BkDestinationRecordResult">
- <include refid="selectBkDestinationRecordVo"/>
- where process_id = #{id}
- </select>
-
- <insert id="insertBkDestinationRecord" parameterType="BkDestinationRecord" useGeneratedKeys="true" keyProperty="id">
- <selectKey keyProperty="fileId" resultType="Long" order="AFTER">
- select LAST_INSERT_ID()
- </selectKey>
- insert into bk_destination_record
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="processId != null">process_id,</if>
- <if test="outTime != null">out_time,</if>
- <if test="outPic != null">out_pic,</if>
- <if test="outLocation != null">out_location,</if>
- <if test="destinationTime != null">destination_time,</if>
- <if test="recordStatus != null ">record_status,</if>
- <if test="destinationPic != null">destination_pic,</if>
- <if test="destinationLocation != null">destination_location,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
-
- <if test="outAddress != null">out_address,</if>
- <if test="destinationAddress != null">destination_address,</if>
-
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="processId != null">#{processId},</if>
- <if test="outTime != null">#{outTime},</if>
- <if test="outPic != null">#{outPic},</if>
- <if test="outLocation != null">#{outLocation},</if>
- <if test="destinationTime != null">#{destinationTime},</if>
- <if test="recordStatus != null "> #{recordStatus},</if>
- <if test="destinationPic != null">#{destinationPic},</if>
- <if test="destinationLocation != null">#{destinationLocation},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
-
- <if test="outAddress != null">#{outAddress},</if>
- <if test="destinationAddress != null">#{destinationAddress},</if>
- </trim>
- </insert>
- <update id="updateBkDestinationRecord" parameterType="BkDestinationRecord">
- update bk_destination_record
- <trim prefix="SET" suffixOverrides=",">
- <if test="processId != null">process_id = #{processId},</if>
- <if test="outTime != null">out_time = #{outTime},</if>
- <if test="outPic != null">out_pic = #{outPic},</if>
- <if test="outLocation != null">out_location = #{outLocation},</if>
- <if test="recordStatus != null "> record_status = #{recordStatus},</if>
- <if test="destinationTime != null">destination_time = #{destinationTime},</if>
- <if test="destinationPic != null">destination_pic = #{destinationPic},</if>
- <if test="destinationLocation != null">destination_location = #{destinationLocation},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="outAddress != null">out_address = #{outAddress},</if>
- <if test="destinationAddress != null">destination_address = #{destinationAddress},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteBkDestinationRecordById" parameterType="Long">
- delete from bk_destination_record where id = #{id}
- </delete>
- <delete id="deleteBkDestinationRecordByIds" parameterType="String">
- delete from bk_destination_record where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|