123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- <?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.ruoyi.system.mapper.PoCollectionMapper">
- <resultMap type="PoCollection" id="PoCollectionResult">
- <result property="collectionId" column="collection_id"/>
- <result property="tetherId" column="tether_id"/>
- <result property="collectionTitle" column="collection_title"/>
- <result property="publisherName" column="publisher_name"/>
- <result property="status" column="status"/>
- <result property="collectionType" column="collection_type"/>
- <result property="colTotal" column="total"/>
- <result property="colCount" column="count"/>
- <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="showStart" column="show_start"/>
- <result property="showEnd" column="show_end"/>
- <result property="colImage" column="image"/>
- <result property="formWork" column="form_work"/>
- <result property="colPrice" column="price"/>
- <result property="colStory" column="story"/>
- <result property="colGrounding" column="grounding"/>
- <result property="colCochain" column="cochain"/>
- <result property="remark" column="remark"/>
- <result property="delFlag" column="del_flag"/>
- <result property="soldOut" column="sold_out"/>
- </resultMap>
- <sql id="selectPoCollectionVo">
- select collection_id,
- tether_id,
- collection_title,
- publisher_name,
- status,
- collection_type,
- total,
- count,
- create_time,
- create_by,
- update_time,
- update_by,
- show_start,
- show_end,
- image,
- form_work,
- price,
- story,
- grounding,
- cochain,
- remark,
- del_flag,
- sold_out
- from po_collection
- </sql>
- <select id="selectPoCollectionList" parameterType="PoCollection" resultMap="PoCollectionResult">
- <include refid="selectPoCollectionVo"/>
- <where>
- <if test="delFlag == null">and del_flag = 0</if>
- <if test="delFlag != null">and del_flag = #{delFlag}</if>
- </where>
- </select>
- <insert id="insertPoCollection" parameterType="PoCollection" useGeneratedKeys="true" keyProperty="collectionId">
- insert into po_collection (
- <if test="collectionTitle != null and collectionTitle != '' ">collection_title,</if>
- <if test="collectionType != null and collectionType != '' ">collection_type,</if>
- <if test="status != null and status != '' ">status,</if>
- <if test="remark != null and remark != ''">remark,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- <if test="showStart != null">show_start,</if>
- <if test="showEnd != null">show_end,</if>
- <if test="colTotal != null and colTotal != ''">total, count,</if>
- <if test="colImage != null and colImage != ''">image,</if>
- <if test="publisherName != null and publisherName != ''">publisher_name,</if>
- <if test="formWork != null and formWork != ''">form_work,</if>
- <if test="colPrice != null and colPrice != ''">price,</if>
- <if test="colStory != null and colStory != ''">story,</if>
- <if test="colGrounding != null and colGrounding != ''">grounding,</if>
- <if test="colCochain != null and colCochain != ''">cochain,</if>
- <if test="tetherId != null and tetherId != ''">tether_id,</if>
- del_flag, sold_out
- )values(
- <if test="collectionTitle != null and collectionTitle != ''">#{collectionTitle},</if>
- <if test="collectionType != null and collectionType != ''">#{collectionType},</if>
- <if test="status != null and status != ''">#{status},</if>
- <if test="remark != null and remark != ''">#{remark},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- <if test="showStart != null">#{showStart},</if>
- <if test="showEnd != null">#{showEnd},</if>
- <if test="colTotal != null">#{colTotal}, #{colTotal},</if>
- <if test="colImage != null and colImage != ''">#{colImage},</if>
- <if test="publisherName != null and publisherName != ''">#{publisherName},</if>
- <if test="formWork != null and formWork != ''">#{formWork},</if>
- <if test="colPrice != null">#{colPrice},</if>
- <if test="colStory != null and colStory != ''">#{colStory},</if>
- <if test="colGrounding != null">#{colGrounding},</if>
- <if test="colCochain != null">#{colCochain},</if>
- <if test="tetherId != null">#{tetherId},</if>
- 0, 0
- )
- </insert>
- <insert id="batchInsertPoCollection" parameterType="PoCollection">
- insert into po_collection (
- <if test="tetherId != null">tether_id,</if>
- <if test="collectionTitle != null and collectionTitle != '' ">collection_title,</if>
- <if test="publisherName != null and publisherName != ''">publisher_name,</if>
- <if test="status != null">status,</if>
- <if test="collectionType != null">collection_type,</if>
- <if test="colTotal != null">total, count,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- <if test="showStart != null">show_start,</if>
- <if test="showEnd != null">show_end,</if>
- <if test="colImage != null and colImage != ''">image,</if>
- <if test="formWork != null and formWork != ''">form_work,</if>
- <if test="colPrice != null">price,</if>
- <if test="colStory != null and colStory != ''">story,</if>
- <if test="colGrounding != null">grounding,</if>
- <if test="colCochain != null">cochain,</if>
- <if test="remark != null and remark != ''">remark,</if>
- del_flag, sold_out
- )values(
- <foreach collection="collections" item="PoCollection" separator=",">
- <if test="tetherId != null">#{tetherId},</if>
- <if test="collectionTitle != null and collectionTitle != '' ">#{collectionTitle},</if>
- <if test="publisherName != null and publisherName != ''">#{publisherName},</if>
- <if test="status != null">#{status},</if>
- <if test="collectionType != null">#{collectionType},</if>
- <if test="colTotal != null">#{colTotal}, #{colTotal},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- <if test="showStart != null">s#{showStart},</if>
- <if test="showEnd != null">#{showEnd},</if>
- <if test="colImage != null and colImage != ''">#{colImage},</if>
- <if test="formWork != null and formWork != ''">#{formWork},</if>
- <if test="colPrice != null">#{colPrice},</if>
- <if test="colStory != null and colStory != ''">#{colStory},</if>
- <if test="colGrounding != null">#{colGrounding},</if>
- <if test="colCochain != null">#{colCochain},</if>
- <if test="remark != null and remark != ''">#{remark},</if>
- 0, 0
- </foreach>
- )
- </insert>
- <update id="updatePoCollection" parameterType="PoCollection">
- update po_collection
- <set>
- <if test="tetherId != null and tetherId != ''">tether_id = #{tetherId},</if>
- <if test="collectionTitle != null and collectionTitle != ''">collection_title = #{collectionTitle},</if>
- <if test="publisherName != null and publisherName != ''">publisher_name = #{publisherName},</if>
- <if test="status != null">status = #{status},</if>
- <if test="collectionType != null">collection_type = #{collectionType},</if>
- <if test="colTotal != null">total = #{colTotal},</if>
- <if test="colCount != null">count = #{colCount},</if>
- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- <if test="showStart != null">show_start = #{showStart},</if>
- <if test="showEnd != null">show_end = #{showEnd},</if>
- <if test="colImage != null and colImage != ''">image = #{colImage},</if>
- <if test="formWork != null and formWork != ''">form_work = #{formWork},</if>
- <if test="colPrice != null">price = #{colPrice},</if>
- <if test="colStory != null and colStory != ''">story = #{colStory},</if>
- <if test="colGrounding != null ">grounding = #{colGrounding},</if>
- <if test="colCochain != null">cochain = #{colCochain},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="soldOut != null">sold_out = #{soldOut},</if>
- </set>
- where collection_id = #{collectionId}
- </update>
- </mapper>
|