12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?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.BkDestinationRecordPicMapper">
-
- <resultMap type="BkDestinationRecordPic" id="BkDestinationRecordPicResult">
- <result property="id" column="id" />
- <result property="destinationRecordId" column="destination_record_id" />
- <result property="picAddr" column="pic_addr" />
- <result property="picNode" column="pic_node" />
- <result property="imgUrl" column="img_url" />
- <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="remark" column="remark" />
- </resultMap>
- <sql id="selectBkDestinationRecordPicVo">
- select id, destination_record_id, pic_addr, create_by, create_time, update_by, update_time, remark,pic_node,img_url from bk_destination_record_pic
- </sql>
- <select id="selectBkDestinationRecordPicList" parameterType="BkDestinationRecordPic" resultMap="BkDestinationRecordPicResult">
- <include refid="selectBkDestinationRecordPicVo"/>
- <where>
- <if test="destinationRecordId != null "> and destination_record_id = #{destinationRecordId}</if>
- <if test="picAddr != null and picAddr != ''"> and pic_addr = #{picAddr}</if>
- <if test="picNode != null and picNode != ''"> and pic_node = #{picNode}</if>
- </where>
- ORDER BY pic_node ASC
- </select>
-
- <select id="selectBkDestinationRecordPicById" parameterType="Long" resultMap="BkDestinationRecordPicResult">
- <include refid="selectBkDestinationRecordPicVo"/>
- where id = #{id}
- </select>
- <insert id="insertBkDestinationRecordPic" parameterType="BkDestinationRecordPic" useGeneratedKeys="true" keyProperty="id">
- <selectKey keyProperty="fileId" resultType="Long" order="AFTER">
- select LAST_INSERT_ID()
- </selectKey>
- insert into bk_destination_record_pic
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="destinationRecordId != null">destination_record_id,</if>
- <if test="picAddr != null and picAddr != ''">pic_addr,</if>
- <if test="picNode != null and picNode != ''">pic_node,</if>
- <if test="imgUrl != null and imgUrl != ''">img_url,</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>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="destinationRecordId != null">#{destinationRecordId},</if>
- <if test="picAddr != null and picAddr != ''">#{picAddr},</if>
- <if test="picNode != null and picNode != ''">#{picNode},</if>
- <if test="imgUrl != null and imgUrl != ''">#{imgUrl},</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>
- </trim>
- </insert>
- <update id="updateBkDestinationRecordPic" parameterType="BkDestinationRecordPic">
- update bk_destination_record_pic
- <trim prefix="SET" suffixOverrides=",">
- <if test="destinationRecordId != null">destination_record_id = #{destinationRecordId},</if>
- <if test="picAddr != null and picAddr != ''">pic_addr = #{picAddr},</if>
- <if test="picNode != null and picNode != ''">pic_node = #{picNode},</if>
- <if test="imgUrl != null and imgUrl != ''">img_url = #{imgUrl},</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>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteBkDestinationRecordPicById" parameterType="Long">
- delete from bk_destination_record_pic where id = #{id}
- </delete>
- <delete id="deleteBkDestinationRecordPicByIds" parameterType="String">
- delete from bk_destination_record_pic where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- </mapper>
|