diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java index d240fa4be..2b8c0887e 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrder.java @@ -282,6 +282,7 @@ public class SysOrder extends BaseEntity { private Integer counted; - + //食谱计划是否连续上个订单 + private Integer recipesPlanContinue; } \ No newline at end of file diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java index d949019dc..24f91e547 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/service/impl/SysRecipesPlanServiceImpl.java @@ -232,8 +232,9 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService { //查询在上一个订单最后一条食谱计划 SysRecipesPlan beforeOrderLastPlan = getLastDayRecipesPlan(sysOrder.getCusId(), sysOrder.getOrderTime()); int startNumDay = 0; - //之前是否存在食谱 - if (beforeOrderLastPlan != null) { + //System.out.println(sysOrder.getRecipesPlanContinue() == null); + //之前是否存在食谱以及该订单食谱计划是否需要连续 + if (beforeOrderLastPlan != null && sysOrder.getRecipesPlanContinue().intValue() == 1) { long differDay = ChronoUnit.DAYS.between(DateUtils.dateToLocalDate(beforeOrderLastPlan.getEndDate()), serverStartDate); //检查之前食谱的结束时间和目前该订单的开始时间是否连续 if(differDay <= 1){ @@ -250,6 +251,7 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService { } startNumDay = beforeOrderLastPlan.getEndNumDay(); } + //System.out.println(startNumDay + "-------------------------------"); List planList = new ArrayList<>(); LocalDate planStartDate = null; LocalDate planEndDate = serverStartDate.plusDays(-1); diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysLiveSchedulMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysLiveSchedulMapper.xml index d1b686eb3..e7b0e32ef 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysLiveSchedulMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysLiveSchedulMapper.xml @@ -28,7 +28,7 @@ - + @@ -60,7 +60,7 @@ su_operator.nick_name as live_operator_name,fc.dict_label as fan_channel_name from sys_live_schedul slc left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'sys_live_type') AS slt ON slt.dict_value = slc.live_room - left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'fan_channel') AS fc ON fc.dict_value = slc.fan_channel + left join (SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'cus_account') AS fc ON fc.dict_value = slc.fan_channel left join sys_user su_nutritionist on su_nutritionist.user_id = slc.live_nutritionist_id and su_nutritionist.del_flag = 0 left join sys_user su_plan on su_plan.user_id = slc.live_planner_id and su_plan.del_flag = 0 left join sys_user su_operator on su_operator.user_id = slc.live_operator_id and su_operator.del_flag = 0 diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml index a10ac1f0b..7ecd014d0 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysOrderMapper.xml @@ -48,6 +48,7 @@ + @@ -393,6 +394,7 @@ + diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml index aa0c9a6f0..279f143ff 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysRecipesPlanMapper.xml @@ -224,7 +224,7 @@