案例管理,添加修改暂停优化,判断时间不能重叠

This commit is contained in:
xiezhijun
2021-03-04 18:35:06 +08:00
parent f70b85a2ed
commit 2a7c499b24
18 changed files with 1005 additions and 10 deletions

View File

@@ -106,9 +106,9 @@
</foreach>
</update>
<!-- 根据订单ID、时间范围查询数量 -->
<select id="getCountByOrderIdAndPauseDate" parameterType="SysOrderPause" resultType="int">
select count(id) from sys_recipes_pause where del_flag = 0 and order_id = #{orderId}
<!-- 根据用户ID、时间范围查询数量 -->
<select id="getCountByCusIdAndPauseDate" parameterType="SysOrderPause" resultType="int">
select count(id) from sys_recipes_pause where del_flag = 0 and cus_id = #{cusId}
AND (#{pauseStartDate} >= pause_start_date AND pause_end_date >= #{pauseStartDate}
OR #{pauseEndDate} >= pause_start_date AND pause_end_date >= #{pauseEndDate})
<if test="id != null">