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] =?UTF-8?q?=E9=A3=9F=E8=B0=B1=E8=AE=A1=E5=88=92=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E7=9B=B4=E6=92=AD=E8=AE=B0=E5=BD=95=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E5=8A=A0=E4=B8=8A=E4=BA=86=E9=A3=9F=E8=B0=B1?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=98=AF=E5=90=A6=E8=BF=9E=E7=BB=AD=E7=9A=84?= =?UTF-8?q?=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<SysRecipesPlan> 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 @@ <result property="fanChannelName" column="fan_channel_name"></result> <!-- 根据渠道查询对应微信号(微信账号分配表中) --> - <association property="wxAccountList" column="fan_channel" select="getWxAccountListByFanChannel"/> + <!--<association property="wxAccountList" column="fan_channel" select="getWxAccountListByFanChannel"/>--> </resultMap> <resultMap type="SysLiveSchedul" id="SysLiveSchedulResultSigle"> @@ -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 @@ <result property="mainOrderId" column="main_order_id"/> <result property="afterSaleCommissOrder" column="after_sale_commiss_order"/> <result property="commissStartTime" column="commiss_start_time"/> + <result property="recipesPlanContinue" column="recipes_plan_continue" /> <result property="delFlag" column="del_flag"/> <result property="counted" column="counted"/> @@ -393,6 +394,7 @@ <result property="mainOrderId" column="main_order_id"/> <result property="afterSaleCommissOrder" column="after_sale_commiss_order"/> <result property="commissStartTime" column="commiss_start_time"/> + <result property="recipesPlanContinue" column="recipes_plan_continue" /> <result property="delFlag" column="del_flag"/> <!-- 非持久化字段 --> 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 @@ <!-- 根据cusId查询食谱计划--> <select id="selectPlanListByCusId" parameterType="Long" resultMap="SysRecipesPlanResult"> <include refid="selectSysRecipesPlanVo"/> - where cus_id=#{cusId} and del_flag = 0 order by id asc + where cus_id=#{cusId} and del_flag = 0 order by start_date asc </select> <select id="getCusIdByOutId" parameterType="String" resultType="Long"> diff --git a/stdiet-ui/src/views/custom/liveSchedul/index.vue b/stdiet-ui/src/views/custom/liveSchedul/index.vue index 688127e60..6fbfc3537 100644 --- a/stdiet-ui/src/views/custom/liveSchedul/index.vue +++ b/stdiet-ui/src/views/custom/liveSchedul/index.vue @@ -41,7 +41,7 @@ /> </el-select> </el-form-item> - <el-form-item label="微信号" prop="wxAccountId"> + <!--<el-form-item label="微信号" prop="wxAccountId"> <el-select v-model="queryParams.wxAccountId" filterable @@ -56,7 +56,7 @@ :value="parseInt(dict.id)" /> </el-select> - </el-form-item> + </el-form-item>--> @@ -323,7 +323,7 @@ :value="parseInt(dict.dictValue)" /> </el-select> - <span style="margin-left:10px;color:#1890ff">该账号与销售接粉微信号绑定</span> + <!--<span style="margin-left:10px;color:#1890ff">该账号与销售接粉微信号绑定</span>--> </el-form-item> <el-form-item label="直播状态" prop="liveStatus"> <el-select @@ -425,7 +425,10 @@ export default { this.getDicts("sys_live_type").then((response) => { this.liveTypeOptions = response.data; }); - this.getDicts("fan_channel").then((response) => { + /**this.getDicts("fan_channel").then((response) => { + this.fanChanneloptions = response.data; + });**/ + this.getDicts("cus_account").then((response) => { this.fanChanneloptions = response.data; }); this.getListWxAccount(); diff --git a/stdiet-ui/src/views/custom/wxAccount/index.vue b/stdiet-ui/src/views/custom/wxAccount/index.vue index 55b79dd7f..a43955ac1 100644 --- a/stdiet-ui/src/views/custom/wxAccount/index.vue +++ b/stdiet-ui/src/views/custom/wxAccount/index.vue @@ -112,6 +112,8 @@ <el-table-column label="状态" align="center" prop="status"> <template slot-scope="scope"> <el-switch + active-text="可接粉" + inactive-text="不可接粉" :value="!scope.row.status" @change="handleOnChange($event, scope.row)" />