|
@@ -46,7 +46,7 @@
|
|
from po_collection
|
|
from po_collection
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
- <select id="selectPoCollectionById" parameterType="Long" resultMap="PoCollectionResult">
|
|
|
|
|
|
+ <select id="selectCollectionById" parameterType="Long" resultMap="PoCollectionResult">
|
|
<include refid="selectPoCollectionVo"/>
|
|
<include refid="selectPoCollectionVo"/>
|
|
where collection_id = #{collectionId}
|
|
where collection_id = #{collectionId}
|
|
</select>
|
|
</select>
|
|
@@ -54,30 +54,18 @@
|
|
<select id="selectPoCollectionList" parameterType="PoCollection" resultMap="PoCollectionResult">
|
|
<select id="selectPoCollectionList" parameterType="PoCollection" resultMap="PoCollectionResult">
|
|
<include refid="selectPoCollectionVo"/>
|
|
<include refid="selectPoCollectionVo"/>
|
|
<where>
|
|
<where>
|
|
- <if test="collectionTitle != null and collectionTitle != ''">
|
|
|
|
- AND collection_title like concat('%', #{collectionTitle}, '%')
|
|
|
|
- </if>
|
|
|
|
- <if test="createBy != null and createBy != ''">
|
|
|
|
- AND create_by like concat('%', #{createBy}, '%')
|
|
|
|
- </if>
|
|
|
|
- <if test="publisherName != null and publisherName != ''">
|
|
|
|
- AND publisher_name like concat('%', #{publisherName}, '%')
|
|
|
|
- </if>
|
|
|
|
- <if test="delFlag != null and delFlag != ''">
|
|
|
|
- AND del_flag like concat('%', #{delFlag}, '%')
|
|
|
|
- </if>
|
|
|
|
- <if test="collectionType != null and collectionType != ''">
|
|
|
|
- AND collection_type like concat('%', #{collectionType}, '%')
|
|
|
|
- </if>
|
|
|
|
- <if test="grouding != null and grouding != ''">
|
|
|
|
- AND grounding like concat('%', #{grounding}, '%')
|
|
|
|
- </if>
|
|
|
|
- <if test="cochain != null and cochain != ''">
|
|
|
|
- AND cochain like concat('%', #{cochain}, '%')
|
|
|
|
- </if>
|
|
|
|
- <if test="tetherId != null and tetherId != ''">
|
|
|
|
- AND tether_id like concat('%', #{tetherId}, '%')
|
|
|
|
- </if>
|
|
|
|
|
|
+ <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="image != null and image != ''"> and image = #{image}</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="story != null and story != ''"> and story = #{story}</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>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -115,6 +103,42 @@
|
|
)
|
|
)
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
|
+ <insert id="batchInsertPoCollection" parameterType="PoCollection">
|
|
|
|
+ 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="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
|
|
|
|
+ )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="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()
|
|
|
|
+ </foreach>
|
|
|
|
+ )
|
|
|
|
+ </insert>
|
|
|
|
+
|
|
<update id="updatePoCollection" parameterType="PoCollection">
|
|
<update id="updatePoCollection" parameterType="PoCollection">
|
|
update po_collection
|
|
update po_collection
|
|
<set>
|
|
<set>
|
|
@@ -135,19 +159,15 @@
|
|
where collection_id = #{collectionId}
|
|
where collection_id = #{collectionId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
- <delete id="deletePoCollectionById" parameterType="Long">
|
|
|
|
- delete
|
|
|
|
- from po_collection
|
|
|
|
- where collection_id = #{collectionId}
|
|
|
|
- and cochain != 0
|
|
|
|
|
|
+ <delete id="deletePoCollectionByCollectionId" parameterType="Long">
|
|
|
|
+ delete from po_collection where collection_id = #{collectionId}
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
- <delete id="deletePoCollectionByIds" parameterType="Long">
|
|
|
|
|
|
+ <delete id="deletePoCollectionByCollectionIds" parameterType="String">
|
|
delete from po_collection where collection_id in
|
|
delete from po_collection where collection_id in
|
|
<foreach item="collectionId" collection="array" open="(" separator="," close=")">
|
|
<foreach item="collectionId" collection="array" open="(" separator="," close=")">
|
|
#{collectionId}
|
|
#{collectionId}
|
|
</foreach>
|
|
</foreach>
|
|
- and cochain != 0
|
|
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|