|
@@ -7,6 +7,7 @@
|
|
|
<resultMap type="PostSeries" id="PostSeriesResult">
|
|
|
<result property="seriesId" column="series_id"/>
|
|
|
<result property="seriesName" column="series_name"/>
|
|
|
+ <result property="seriesImage" column="series_image"/>
|
|
|
<result property="collectionCounts" column="collection_counts"/>
|
|
|
<result property="status" column="status"/>
|
|
|
<result property="exchangeStatus" column="exchange_status"/>
|
|
@@ -23,6 +24,7 @@
|
|
|
<sql id="selectPostSeriesVo">
|
|
|
select series_id,
|
|
|
series_name,
|
|
|
+ cast(series_image as char) as series_image,
|
|
|
collection_counts,
|
|
|
status,
|
|
|
exchange_status,
|
|
@@ -36,8 +38,8 @@
|
|
|
<select id="selectPostSeriesList" parameterType="PostSeries" resultMap="PostSeriesResult">
|
|
|
<include refid="selectPostSeriesVo"/>
|
|
|
<where>
|
|
|
- <if test="seriesName != null and seriesName != ''">and series_name like concat('%', #{seriesName}, '%')
|
|
|
- </if>
|
|
|
+ <if test="seriesName != null and seriesName != ''">and series_name like concat('%', #{seriesName}, '%') </if>
|
|
|
+ <if test="seriesImage != null and seriesImage != ''"> and series_image = #{seriesImage}</if>
|
|
|
<if test="collectionCounts != null ">and collection_counts = #{collectionCounts}</if>
|
|
|
<if test="status != null and status != ''">and status = #{status}</if>
|
|
|
<if test="exchangeStatus != null and exchangeStatus != ''">and exchange_status = #{exchangeStatus}</if>
|
|
@@ -55,6 +57,7 @@
|
|
|
insert into post_series
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="seriesName != null and seriesName != ''">series_name,</if>
|
|
|
+ <if test="seriesImage != null">series_image,</if>
|
|
|
<if test="collectionCounts != null">collection_counts,</if>
|
|
|
<if test="status != null and status != ''">status,</if>
|
|
|
<if test="exchangeStatus != null and exchangeStatus != ''">exchange_status,</if>
|
|
@@ -69,6 +72,7 @@
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="seriesName != null and seriesName != ''">#{seriesName},</if>
|
|
|
+ <if test="seriesImage != null">#{seriesImage},</if>
|
|
|
<if test="collectionCounts != null">#{collectionCounts},</if>
|
|
|
<if test="status != null and status != ''">#{status},</if>
|
|
|
<if test="exchangeStatus != null and exchangeStatus != ''">#{exchangeStatus},</if>
|
|
@@ -87,6 +91,7 @@
|
|
|
update post_series
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="seriesName != null and seriesName != ''">series_name = #{seriesName},</if>
|
|
|
+ <if test="seriesImage != null">series_image = #{seriesImage},</if>
|
|
|
<if test="collectionCounts != null">collection_counts = #{collectionCounts},</if>
|
|
|
<if test="status != null and status != ''">status = #{status},</if>
|
|
|
<if test="exchangeStatus != null and exchangeStatus != ''">exchange_status = #{exchangeStatus},</if>
|
|
@@ -116,7 +121,9 @@
|
|
|
</update>
|
|
|
<!-- 判断套系名字唯一 -->
|
|
|
<select id="checkSeriesNameUnique" parameterType="String" resultMap="PostSeriesResult">
|
|
|
- select series_id, series_name from post_series where series_name = #{seriesName} limit 1
|
|
|
+ select series_id, series_name
|
|
|
+ from post_series
|
|
|
+ where series_name = #{seriesName} limit 1
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|