From ba103faaeadc97f609aa644cbf3f8403e2141c20 Mon Sep 17 00:00:00 2001 From: xiezhijun <15270898033@163.com> Date: Mon, 17 May 2021 16:29:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A3=9F=E8=B0=B1=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E7=9B=B4=E6=92=AD=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E5=8A=A0=E4=B8=8A=E4=BA=86=E9=A3=9F?= =?UTF-8?q?=E8=B0=B1=E8=AE=A1=E5=88=92=E6=98=AF=E5=90=A6=E8=BF=9E=E7=BB=AD?= =?UTF-8?q?=E7=9A=84=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/stdiet/custom/domain/SysOrder.java | 3 ++- .../service/impl/SysRecipesPlanServiceImpl.java | 6 ++++-- .../resources/mapper/custom/SysLiveSchedulMapper.xml | 4 ++-- .../main/resources/mapper/custom/SysOrderMapper.xml | 2 ++ .../resources/mapper/custom/SysRecipesPlanMapper.xml | 2 +- stdiet-ui/src/views/custom/liveSchedul/index.vue | 11 +++++++---- stdiet-ui/src/views/custom/wxAccount/index.vue | 2 ++ 7 files changed, 20 insertions(+), 10 deletions(-) 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 @@