|
@@ -7,6 +7,10 @@
|
|
<resultMap type="PostCollection" id="PostCollectionResult">
|
|
<resultMap type="PostCollection" id="PostCollectionResult">
|
|
<result property="collectionId" column="collection_id"/>
|
|
<result property="collectionId" column="collection_id"/>
|
|
<result property="collectionName" column="collection_name"/>
|
|
<result property="collectionName" column="collection_name"/>
|
|
|
|
+ <result property="collectionImage" column="collection_image"/>
|
|
|
|
+ <result property="collectionDetails" column="collection_details"/>
|
|
|
|
+ <result property="collection3dimage" column="collection_3dimage"/>
|
|
|
|
+ <result property="publisherName" column="publisher_name"/>
|
|
<result property="collectionPrice" column="collection_price"/>
|
|
<result property="collectionPrice" column="collection_price"/>
|
|
<result property="collectionCounts" column="collection_counts"/>
|
|
<result property="collectionCounts" column="collection_counts"/>
|
|
<result property="collectionStatus" column="collection_status"/>
|
|
<result property="collectionStatus" column="collection_status"/>
|
|
@@ -25,6 +29,10 @@
|
|
<sql id="selectPostCollectionVo">
|
|
<sql id="selectPostCollectionVo">
|
|
select collection_id,
|
|
select collection_id,
|
|
collection_name,
|
|
collection_name,
|
|
|
|
+ cast(collection_image as char) as collection_image,
|
|
|
|
+ cast(collection_details as char) as collection_details,
|
|
|
|
+ cast(collection_3dimage as char) as collection_3dimage,
|
|
|
|
+ publisher_name,
|
|
collection_price,
|
|
collection_price,
|
|
collection_counts,
|
|
collection_counts,
|
|
collection_status,
|
|
collection_status,
|
|
@@ -43,6 +51,16 @@
|
|
<if test="collectionName != null and collectionName != ''">and collection_name like concat('%',
|
|
<if test="collectionName != null and collectionName != ''">and collection_name like concat('%',
|
|
#{collectionName}, '%')
|
|
#{collectionName}, '%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="collectionImage != null and collectionImage != ''">and collection_image = #{collectionImage}</if>
|
|
|
|
+ <if test="collectionDetails != null and collectionDetails != ''">and collection_details =
|
|
|
|
+ #{collectionDetails}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="collection3dimage != null and collection3dimage != ''">and collection_3dimage =
|
|
|
|
+ #{collection3dimage}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="publisherName != null and publisherName != ''">and publisher_name like concat('%',
|
|
|
|
+ #{publisherName}, '%')
|
|
|
|
+ </if>
|
|
<if test="collectionPrice != null ">and collection_price = #{collectionPrice}</if>
|
|
<if test="collectionPrice != null ">and collection_price = #{collectionPrice}</if>
|
|
<if test="collectionCounts != null ">and collection_counts = #{collectionCounts}</if>
|
|
<if test="collectionCounts != null ">and collection_counts = #{collectionCounts}</if>
|
|
<if test="collectionStatus != null and collectionStatus != ''">and collection_status =
|
|
<if test="collectionStatus != null and collectionStatus != ''">and collection_status =
|
|
@@ -65,6 +83,10 @@
|
|
insert into post_collection
|
|
insert into post_collection
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="collectionName != null and collectionName != ''">collection_name,</if>
|
|
<if test="collectionName != null and collectionName != ''">collection_name,</if>
|
|
|
|
+ <if test="collectionImage != null and collectionImage != ''">collection_image,</if>
|
|
|
|
+ <if test="collectionDetails != null">collection_details,</if>
|
|
|
|
+ <if test="collection3dimage != null and collection3dimage != ''">collection_3dimage,</if>
|
|
|
|
+ <if test="publisherName != null">publisher_name,</if>
|
|
<if test="collectionPrice != null">collection_price,</if>
|
|
<if test="collectionPrice != null">collection_price,</if>
|
|
<if test="collectionCounts != null">collection_counts,</if>
|
|
<if test="collectionCounts != null">collection_counts,</if>
|
|
<if test="collectionStatus != null and collectionStatus != ''">collection_status,</if>
|
|
<if test="collectionStatus != null and collectionStatus != ''">collection_status,</if>
|
|
@@ -81,6 +103,10 @@
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="collectionName != null and collectionName != ''">#{collectionName},</if>
|
|
<if test="collectionName != null and collectionName != ''">#{collectionName},</if>
|
|
|
|
+ <if test="collectionImage != null and collectionImage != ''">#{collectionImage},</if>
|
|
|
|
+ <if test="collectionDetails != null">#{collectionDetails},</if>
|
|
|
|
+ <if test="collection3dimage != null and collection3dimage != ''">#{collection3dimage},</if>
|
|
|
|
+ <if test="publisherName != null">#{publisherName},</if>
|
|
<if test="collectionPrice != null">#{collectionPrice},</if>
|
|
<if test="collectionPrice != null">#{collectionPrice},</if>
|
|
<if test="collectionCounts != null">#{collectionCounts},</if>
|
|
<if test="collectionCounts != null">#{collectionCounts},</if>
|
|
<if test="collectionStatus != null and collectionStatus != ''">#{collectionStatus},</if>
|
|
<if test="collectionStatus != null and collectionStatus != ''">#{collectionStatus},</if>
|
|
@@ -101,6 +127,10 @@
|
|
update post_collection
|
|
update post_collection
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="collectionName != null and collectionName != ''">collection_name = #{collectionName},</if>
|
|
<if test="collectionName != null and collectionName != ''">collection_name = #{collectionName},</if>
|
|
|
|
+ <if test="collectionImage != null and collectionImage != ''">collection_image = #{collectionImage},</if>
|
|
|
|
+ <if test="collectionDetails != null">collection_details = #{collectionDetails},</if>
|
|
|
|
+ <if test="collection3dimage != null and collection3dimage != ''">collection_3dimage = #{collection3dimage},</if>
|
|
|
|
+ <if test="publisherName != null">publisher_name = #{publisherName},</if>
|
|
<if test="collectionPrice != null">collection_price = #{collectionPrice},</if>
|
|
<if test="collectionPrice != null">collection_price = #{collectionPrice},</if>
|
|
<if test="collectionCounts != null">collection_counts = #{collectionCounts},</if>
|
|
<if test="collectionCounts != null">collection_counts = #{collectionCounts},</if>
|
|
<if test="collectionStatus != null and collectionStatus != ''">collection_status = #{collectionStatus},</if>
|
|
<if test="collectionStatus != null and collectionStatus != ''">collection_status = #{collectionStatus},</if>
|
|
@@ -133,9 +163,10 @@
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
<select id="checkNameUnique" parameterType="String" resultMap="PostCollectionResult">
|
|
<select id="checkNameUnique" parameterType="String" resultMap="PostCollectionResult">
|
|
- select collection_id, collection_name from post_collection where collection_name = #{collectionName} limit 1
|
|
|
|
|
|
+ select collection_id, collection_name
|
|
|
|
+ from post_collection
|
|
|
|
+ where collection_name = #{collectionName} limit 1
|
|
</select>
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|