|
@@ -3,70 +3,64 @@
|
|
|
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="collectionType" column="collection_type"/>
|
|
|
+ <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="delFlag" column="del_flag"/>
|
|
|
+ <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="image" column="image"/>
|
|
|
- <result property="formwork" column="formwork"/>
|
|
|
- <result property="price" column="price"/>
|
|
|
- <result property="publisherName" column="publisher_name"/>
|
|
|
- <result property="story" column="story"/>
|
|
|
- <result property="grounding" column="grouding"/>
|
|
|
- <result property="cochain" column="cochain"/>
|
|
|
- <result property="tetherId" column="tether_id"/>
|
|
|
+ <result property="delFlag" column="del_flag"/>
|
|
|
+ <result property="soldOut" column="sold_out"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectPoCollectionVo">
|
|
|
select collection_id,
|
|
|
+ tether_id,
|
|
|
collection_title,
|
|
|
- collection_type,
|
|
|
+ publisher_name,
|
|
|
status,
|
|
|
- create_by,
|
|
|
+ collection_type,
|
|
|
+ total,
|
|
|
+ count,
|
|
|
create_time,
|
|
|
- update_by,
|
|
|
+ create_by,
|
|
|
update_time,
|
|
|
- remark,
|
|
|
- del_flag,
|
|
|
+ update_by,
|
|
|
+ show_start,
|
|
|
+ show_end,
|
|
|
image,
|
|
|
- publisher_name,
|
|
|
- formwork,
|
|
|
+ form_work,
|
|
|
price,
|
|
|
story,
|
|
|
grounding,
|
|
|
cochain,
|
|
|
- tether_id
|
|
|
+ remark,
|
|
|
+ del_flag,
|
|
|
+ sold_out
|
|
|
from po_collection
|
|
|
</sql>
|
|
|
|
|
|
- <select id="selectCollectionById" parameterType="Long" resultMap="PoCollectionResult">
|
|
|
- <include refid="selectPoCollectionVo"/>
|
|
|
- where collection_id = #{collectionId}
|
|
|
- </select>
|
|
|
-
|
|
|
<select id="selectPoCollectionList" parameterType="PoCollection" resultMap="PoCollectionResult">
|
|
|
<include refid="selectPoCollectionVo"/>
|
|
|
<where>
|
|
|
- <if test="collectionTitle != null and collectionTitle != ''">and collection_title = #{collectionTitle}</if>
|
|
|
- <if test="status != null and status != ''">and status = #{status}</if>
|
|
|
- <if test="collectionType != null ">and collection_type = #{collectionType}</if>
|
|
|
- <if test="total != null ">and total = #{total}</if>
|
|
|
- <if test="formwork != null and formwork != ''">and formwork = #{formwork}</if>
|
|
|
- <if test="price != null ">and price = #{price}</if>
|
|
|
- <if test="publisherName != null ">and publisher_name like concat('%', #{publisherName}, '%')</if>
|
|
|
- <if test="grounding != null ">and grounding = #{grounding}</if>
|
|
|
- <if test="cochain != null ">and cochain = #{cochain}</if>
|
|
|
- <if test="tetherId != null ">and tether_id = #{tetherId}</if>
|
|
|
- <if test="delFlag != null">and del_flag = #{delFlag}</if>
|
|
|
<if test="delFlag == null">and del_flag = 0</if>
|
|
|
+ <if test="delFlag != null">and del_flag = #{delFlag}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -77,73 +71,77 @@
|
|
|
<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="total != null and total != ''">total,</if>
|
|
|
- <if test="image != null and image != ''">image,</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 != ''">formwork,</if>
|
|
|
- <if test="price != null and price != ''">price,</if>
|
|
|
- <if test="story != null and story != ''">story,</if>
|
|
|
- <if test="grouding != null and grouding != ''">grounding,</if>
|
|
|
- <if test="cochain != null and cochain != ''">cochain,</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,
|
|
|
- create_time
|
|
|
+ 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="total != null and total != ''">#{total},</if>
|
|
|
- <if test="image != null and image != ''">#{image},</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="price != null and price != ''">#{price},</if>
|
|
|
- <if test="story != null and story != ''">#{story},</if>
|
|
|
- <if test="grouding != null and grouding != ''">#{grounding},</if>
|
|
|
- <if test="cochain != null and cochain != ''">#{cochain},</if>
|
|
|
- <if test="tetherId != null and tetherId != ''">#{tetherId},</if>
|
|
|
- 0,
|
|
|
- sysdate()
|
|
|
+ <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="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="total != null and total != ''">total,</if>
|
|
|
- <if test="image != null and image != ''">image,</if>
|
|
|
<if test="publisherName != null and publisherName != ''">publisher_name,</if>
|
|
|
- <if test="formwork != null and formwork != ''">formwork,</if>
|
|
|
- <if test="price != null and price != ''">price,</if>
|
|
|
- <if test="story != null and story != ''">story,</if>
|
|
|
- <if test="grouding != null and grouding != ''">grounding,</if>
|
|
|
- <if test="cochain != null and cochain != ''">cochain,</if>
|
|
|
- <if test="tetherId != null and tetherId != ''">tether_id,</if>
|
|
|
- del_flag,
|
|
|
- create_time
|
|
|
+ <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="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="total != null and total != ''">#{total},</if>
|
|
|
- <if test="image != null and image != ''">#{image},</if>
|
|
|
+ <if test="tetherId != null">#{tetherId},</if>
|
|
|
+ <if test="collectionTitle != null and collectionTitle != '' ">#{collectionTitle},</if>
|
|
|
<if test="publisherName != null and publisherName != ''">#{publisherName},</if>
|
|
|
- <if test="formwork != null and formwork != ''">#{formwork},</if>
|
|
|
- <if test="price != null and price != ''">#{price},</if>
|
|
|
- <if test="story != null and story != ''">#{story},</if>
|
|
|
- <if test="grouding != null and grouding != ''">#{grounding},</if>
|
|
|
- <if test="cochain != null and cochain != ''">#{cochain},</if>
|
|
|
- <if test="tetherId != null and tetherId != ''">#{tetherId},</if>
|
|
|
- 0,
|
|
|
- sysdate()
|
|
|
+ <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>
|
|
@@ -151,37 +149,26 @@
|
|
|
<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="collectionType != null and collectionType != ''">collection_type = #{collectionType},</if>
|
|
|
- <if test="status != null and status != ''">status = #{status},</if>
|
|
|
- <if test="remark != null and remark != ''">remark = #{remark},</if>
|
|
|
- <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
- <if test="total != null and total != ''">total = #{total},</if>
|
|
|
- <if test="image != null and image != ''">image = #{image},</if>
|
|
|
<if test="publisherName != null and publisherName != ''">publisher_name = #{publisherName},</if>
|
|
|
- <if test="formwork != null and formwork != ''">formwork = #{formwork},</if>
|
|
|
- <if test="price != null and price != ''">price = #{price},</if>
|
|
|
- <if test="story != null and story != ''">story = #{story},</if>
|
|
|
- <if test="grouding != null and grouding != ''">grouding = #{grounding},</if>
|
|
|
- <if test="cochain != null and cochain != ''">cochain = #{cochain},</if>
|
|
|
- <if test="tetherId != null and tetherId != ''">tether_id = #{tetherId},</if>
|
|
|
- <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
|
|
- update_time = sysdate()
|
|
|
+ <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>
|
|
|
-
|
|
|
- <update id="deletePoCollectionByCollectionId" parameterType="Long">
|
|
|
- update po_collection
|
|
|
- SET del_flag = 1
|
|
|
- where collection_id = #{collectionId}
|
|
|
- </update>
|
|
|
-
|
|
|
- <update id="deletePoCollectionByCollectionIds" parameterType="String">
|
|
|
- update po_collection SET del_flag = #{1} where collection_id in
|
|
|
- <foreach item="collectionId" collection="array" open="(" separator="," close=")">
|
|
|
- #{collectionId}
|
|
|
- </foreach>
|
|
|
- </update>
|
|
|
-
|
|
|
</mapper>
|