|
@@ -113,6 +113,7 @@
|
|
|
<if test="exchange != null">and exchange = #{exchange}</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>
|
|
|
and del_flag = '0'
|
|
|
and sell_status = 2
|
|
|
</where>
|
|
@@ -163,6 +164,20 @@
|
|
|
</foreach>
|
|
|
</select>
|
|
|
|
|
|
+<!-- 查询更新完种类数的套系信息-->
|
|
|
+ <select id="selectPoTetherCollectionList" resultType="PoTether" resultMap="PoTetherResult">
|
|
|
+ <include refid="selectPoTetherVo"/>
|
|
|
+ <if test="tetherName != null and tetherName != ''"> and tether_name like concat('%', #{tetherName}, '%')</if>
|
|
|
+ <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>
|
|
|
+ <if test="exchange != null">and exchange = #{exchange}</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>
|
|
|
+ </select>
|
|
|
+
|
|
|
<!--新增-->
|
|
|
<insert id="insertPoTether" parameterType="PoTether" useGeneratedKeys="true" keyProperty="tetherId">
|
|
|
insert into po_tether
|
|
@@ -245,5 +260,18 @@
|
|
|
<update id="updatePoTetherIsGrounding" parameterType="PoTether">
|
|
|
update po_tether set grounding = #{grounding} where tether_id = #{tetherId}
|
|
|
</update>
|
|
|
+<!-- 更新种类-->
|
|
|
+ <update id="updatePostTetherCollection" parameterType="PoTether">
|
|
|
+ UPDATE po_tether INNER JOIN (
|
|
|
+ SELECT
|
|
|
+ po_tether.tether_id,
|
|
|
+ ( SELECT COUNT( po_Tetherandcollection.tether_id )
|
|
|
+ FROM po_Tetherandcollection WHERE po_tether.tether_id = po_Tetherandcollection.tether_id ) AS total
|
|
|
+ FROM
|
|
|
+ po_tether
|
|
|
+ ) a
|
|
|
+ ON po_tether.tether_id = a.tether_id
|
|
|
+ SET po_tether.total = a.total
|
|
|
+ </update>
|
|
|
</mapper>
|
|
|
|