|
@@ -17,6 +17,7 @@
|
|
|
<result property="remark" column="remark" />
|
|
|
<result property="sellStatus" column="sell_status"/>
|
|
|
<result property="delFlag" column="del_flag"/>
|
|
|
+ <result property="image" column="image" />
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="PoCollection" id="PoCollectionResult">
|
|
@@ -41,7 +42,7 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectPoTetherVo">
|
|
|
- select tether_id, tether_name, show_time, create_by, create_time, update_by, update_time, total, status, remark ,sell_status,del_flag from po_tether
|
|
|
+ select tether_id, tether_name, show_time, create_by, create_time, update_by, update_time, total, status, remark ,sell_status,del_flag,image from po_tether
|
|
|
</sql>
|
|
|
|
|
|
<!--在售-->
|
|
@@ -52,6 +53,7 @@
|
|
|
<if test="showTime != null "> and show_time = #{showTime}</if>
|
|
|
<if test="total != null "> and total = #{total}</if>
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
+ <if test="image != null and image != '' ">and image = #{image}</if>
|
|
|
and del_flag = '0'
|
|
|
and sell_status = 0
|
|
|
</where>
|
|
@@ -81,6 +83,7 @@
|
|
|
<if test="showTime != null "> and show_time = #{showTime}</if>
|
|
|
<if test="total != null "> and total = #{total}</if>
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
+ <if test="image != null and image != '' ">and image = #{image}</if>
|
|
|
and del_flag = '0'
|
|
|
and sell_status = 1
|
|
|
</where>
|
|
@@ -94,6 +97,7 @@
|
|
|
<if test="showTime != null "> and show_time = #{showTime}</if>
|
|
|
<if test="total != null "> and total = #{total}</if>
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
+ <if test="image != null and image != '' ">and image = #{image}</if>
|
|
|
and del_flag = '0'
|
|
|
and sell_status = 2
|
|
|
</where>
|
|
@@ -107,6 +111,7 @@
|
|
|
<if test="showTime != null "> and show_time = #{showTime}</if>
|
|
|
<if test="total != null "> and total = #{total}</if>
|
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
+ <if test="image != null and image != '' ">and image = #{image}</if>
|
|
|
and del_flag = '0'
|
|
|
</where>
|
|
|
|
|
@@ -120,7 +125,17 @@
|
|
|
|
|
|
</select>
|
|
|
|
|
|
-<!--新增-->
|
|
|
+<!-- 检验标题是否重复-->
|
|
|
+ <select id="checkPostTetherTitleUnique" resultType="PoTether" resultMap="PoTetherResult">
|
|
|
+ select tether_id, tether_name from po_tether where tether_name = #{tetherName} and del_flag = '0' limit 1
|
|
|
+ </select>
|
|
|
+
|
|
|
+<!-- 检验图片是否重复-->
|
|
|
+ <select id="checkPostTetherImageUnique" resultType="PoTether" resultMap="PoTetherResult">
|
|
|
+ select tether_id,image from po_tether where image = #{image} and del_flag = '0' limit 1
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--新增-->
|
|
|
<insert id="insertPoTether" parameterType="PoTether" useGeneratedKeys="true" keyProperty="tetherId">
|
|
|
insert into po_tether
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -134,6 +149,7 @@
|
|
|
<if test="status != null">status,</if>
|
|
|
<if test="remark != null">remark,</if>
|
|
|
<if test="sellStatus != null">sell_status,</if>
|
|
|
+ <if test="image != null and image != ''">image,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="tetherName != null">#{tetherName},</if>
|
|
@@ -146,6 +162,7 @@
|
|
|
<if test="status != null">#{status},</if>
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
<if test="sellStatus != null">#{sellStatus},</if>
|
|
|
+ <if test="image != null and image != ''">#{image},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
@@ -162,6 +179,7 @@
|
|
|
<if test="status != null">status = #{status},</if>
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
<if test="sellStatus != null">sell_status = #{sellStatus},</if>
|
|
|
+ <if test="image != null and image != ''">image = #{image},</if>
|
|
|
</trim>
|
|
|
where tether_id = #{tetherId}
|
|
|
</update>
|