食谱计划生成优化
This commit is contained in:
@ -120,4 +120,10 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 根据订单ID获取暂停记录,根据暂停开始时间排序,用于生成食谱计划,不能随意修改排序方式 -->
|
||||
<select id="getPauseListByOrderId" parameterType="Long" resultMap="SysOrderPauseResult">
|
||||
<include refid="selectSysOrderPauseVo"></include>
|
||||
where sop.del_flag = 0 and sop.order_id = #{orderId} order by sop.pause_start_date asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -132,16 +132,16 @@
|
||||
where id = #{id} and del_flag = 0
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysRecipesPlanById" parameterType="Long">
|
||||
delete from sys_recipes_plan where id = #{id}
|
||||
</delete>
|
||||
<update id="deleteSysRecipesPlanById" parameterType="Long">
|
||||
update sys_recipes_plan set del_flag = 1 where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysRecipesPlanByIds" parameterType="String">
|
||||
delete from sys_recipes_plan where id in
|
||||
<update id="deleteSysRecipesPlanByIds" parameterType="String">
|
||||
update sys_recipes_plan set del_flag = 1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</update>
|
||||
|
||||
<!-- 批量插入食谱计划 -->
|
||||
<insert id="insertBatch">
|
||||
@ -156,7 +156,7 @@
|
||||
|
||||
<!-- 根据订单ID删除对应食谱计划 -->
|
||||
<update id="delRecipesPlanByOrderId" parameterType="String">
|
||||
delete from sys_recipes_plan where order_id in
|
||||
update sys_recipes_plan set del_flag = 1 where order_id in
|
||||
<foreach item="orderId" collection="array" open="(" separator="," close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
@ -217,7 +217,7 @@
|
||||
<!-- 根据cusId查询食谱计划-->
|
||||
<select id="selectPlanListByCusId" parameterType="Long" resultMap="SysRecipesPlanResult">
|
||||
select id, out_id, start_date, end_date, start_num_day, end_num_day, recipes_id, review_status from sys_recipes_plan
|
||||
where cus_id=#{cusId} order by id desc
|
||||
where cus_id=#{cusId} and del_flag = 0 order by id desc
|
||||
</select>
|
||||
|
||||
<select id="getCusIdByOutId" parameterType="String" resultType="Long">
|
||||
@ -235,7 +235,7 @@
|
||||
|
||||
<!-- 通过outId查询食谱计划简要-->
|
||||
<select id="selectRecipesPlanListInfo" resultMap="SysRecipesPlanListInfoResult">
|
||||
select id, start_date, end_date, start_num_day, end_num_day, recipes_id from sys_recipes_plan where out_id=#{outId}
|
||||
select id, start_date, end_date, start_num_day, end_num_day, recipes_id from sys_recipes_plan where out_id=#{outId} and del_flag = 0
|
||||
</select>
|
||||
|
||||
<resultMap type="SysRecipesDaily" id="SysRecipesResult">
|
||||
@ -244,7 +244,7 @@
|
||||
</resultMap>
|
||||
|
||||
<select id="selectMenuIds" parameterType="Long" resultMap="SysRecipesResult">
|
||||
select id, num_day from sys_customer_daily_menu where recipes_id=#{recipes_id} order by num_day asc
|
||||
select id, num_day from sys_customer_daily_menu where recipes_id=#{recipes_id} and del_flag = 0 order by num_day asc
|
||||
</select>
|
||||
|
||||
<!-- 批量修改食谱计划 -->
|
||||
|
Reference in New Issue
Block a user