@ -173,4 +173,14 @@
|
||||
update sys_nutritional_video set play_num = play_num + 1 where video_id = #{videoId} and del_flag = 0
|
||||
</update>
|
||||
|
||||
<!-- 根据视频分类ID查询该分类下视频总量 -->
|
||||
<select id="getVideoCountByCateId" parameterType="Long" resultType="int">
|
||||
select count(snv.id) from sys_nutritional_video snv where snv.del_flag = 0
|
||||
and snv.cate_id in (
|
||||
select id from sys_video_classify where del_flag = 0
|
||||
and (id = #{cateId} or id in (select s.id from sys_video_classify s where s.parent_id = #{cateId} and s.del_flag = 0)
|
||||
or id in (select ss.id from sys_video_classify ss where ss.del_flag = 0 and ss.parent_id in (select a.id from sys_video_classify a where a.parent_id = #{cateId} and a.del_flag = 0 )))
|
||||
)
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -113,6 +113,7 @@
|
||||
<if test="status != null ">and status = #{status}</if>
|
||||
<if test="payTypeId != null ">and pay_type_id = #{payTypeId}</if>
|
||||
<if test="preSaleId != null ">and pre_sale_id = #{preSaleId}</if>
|
||||
<if test="pushPreSaleId != null ">and push_pre_sale_id = #{pushPreSaleId}</if>
|
||||
<if test="onSaleId != null">
|
||||
and on_sale_id = #{onSaleId}
|
||||
</if>
|
||||
@ -167,6 +168,7 @@
|
||||
<if test="phone != null and phone != ''">and sc.phone = #{phone}</if>
|
||||
<if test="status != null ">and status = #{status}</if>
|
||||
<if test="payTypeId != null ">and pay_type_id = #{payTypeId}</if>
|
||||
<if test="pushPreSaleId != null ">and push_pre_sale_id = #{pushPreSaleId}</if>
|
||||
<if test="onSaleId != null">
|
||||
and on_sale_id = #{onSaleId}
|
||||
</if>
|
||||
|
@ -159,4 +159,11 @@
|
||||
order by priority_level asc
|
||||
</select>
|
||||
|
||||
<!-- 根据分类ID查询该分类ID以及分类下的子类ID -->
|
||||
<select id="getVideoClassifyIdsById" parameterType="Long" resultType="Long">
|
||||
select id from sys_video_classify where del_flag = 0
|
||||
and (id = #{id} or id in (select s.id from sys_video_classify s where s.parent_id = #{id} and s.del_flag = 0)
|
||||
or id in (select ss.id from sys_video_classify ss where ss.del_flag = 0 and ss.parent_id in (select a.id from sys_video_classify a where a.parent_id = #{id} and a.del_flag = 0 )))
|
||||
</select>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user