|
@@ -111,20 +111,56 @@
|
|
|
<select id="selectPostListByTitleOrTime" resultType="PostCollectionsSystem" resultMap="PostCollectionsSystemResult">
|
|
|
<include refid="selectPostCollectionsSystemVo"/>
|
|
|
<where>
|
|
|
- <if test="title != null and title != ''"> and name LIKE CONCAT(CONCAT('%',#{title},'%'))</if>
|
|
|
+ <if test="title != null and title != ''"> and name LIKE concat('%', #{title}, '%')</if>
|
|
|
<if test="timeLeft != null and timeRight != null "> and create_time between #{timeLeft} AND #{timeRight}</if>
|
|
|
and del_flag = '0'
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
+ <!--获取套系 所对应藏品种类 数量-->
|
|
|
<select id="getCopiesById" parameterType="Long" resultType="Integer">
|
|
|
SELECT COUNt(system_id) FROM post_collections where system_id = #{id}
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
<!--用藏品名称进行查询数量-->
|
|
|
<select id="selectPostCollectionsSystemByName" parameterType="PostCollectionsSystem" resultType="int">
|
|
|
SELECT COUNT(name) FROM post_collections_system where name = #{name} and del_flag = '0'
|
|
|
</select>
|
|
|
+
|
|
|
+ <!--通过ids 查询套系-->
|
|
|
+ <select id="selectPostCollectionsSystemByIds" parameterType="String" resultMap="PostCollectionsSystemResult">
|
|
|
+ <include refid="selectPostCollectionsSystemVo"/>
|
|
|
+ <where>
|
|
|
+ id IN
|
|
|
+ <foreach item="id" collection="list" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ and del_flag = '0'
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="updateBatchById" parameterType="list">
|
|
|
+ <foreach collection="list" item="item" separator=";">
|
|
|
+ update
|
|
|
+ `post_collections_system`
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="item.type != null">type = #{item.type},</if>
|
|
|
+ <if test="item.name != null">name = #{item.name},</if>
|
|
|
+ <if test="item.createTime != null">create_time = #{item.createTime},</if>
|
|
|
+ <if test="item.startTime != null">start_time = #{item.startTime},</if>
|
|
|
+ <if test="item.endTime != null">end_time = #{item.endTime},</if>
|
|
|
+ <if test="item.status != null">status = #{item.status},</if>
|
|
|
+ <if test="item.image != null">image = #{item.image},</if>
|
|
|
+ <if test="item.giftExchange != null">gift_exchange = #{item.giftExchange},</if>
|
|
|
+ <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
|
|
|
+ <if test="item.createBy != null">create_by = #{item.createBy},</if>
|
|
|
+ <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
|
|
|
+ <if test="item.delFlag != null">del_flag = #{item.delFlag},</if>
|
|
|
+ </trim>
|
|
|
+ where
|
|
|
+ id = #{item.id}
|
|
|
+
|
|
|
+ </foreach>
|
|
|
+ </update>
|
|
|
+
|
|
|
</mapper>
|