From 8f94c50d22f0e3a37f11fc8442c915a39b44d4a0 Mon Sep 17 00:00:00 2001 From: huangdeliang Date: Mon, 29 Mar 2021 19:42:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=9A=82=E5=81=9C=E6=97=A5?= =?UTF-8?q?=E6=9C=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/custom/SysWapController.java | 20 ++- .../stdiet/custom/domain/SysOrderPause.java | 2 + .../mapper/custom/SysOrderPauseMapper.xml | 7 +- stdiet-ui/src/api/custom/recipesShow.js | 11 ++ .../src/components/OrderDrawer/index.vue | 10 +- .../src/views/custom/recipesShow/index.vue | 121 +++++++++++------- 6 files changed, 116 insertions(+), 55 deletions(-) diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWapController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWapController.java index 4acf10865..63f6ab9b0 100644 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWapController.java +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWapController.java @@ -2,6 +2,8 @@ package com.stdiet.web.controller.custom; import com.stdiet.common.core.controller.BaseController; import com.stdiet.common.core.domain.AjaxResult; +import com.stdiet.custom.domain.SysOrderPause; +import com.stdiet.custom.service.ISysOrderPauseService; import com.stdiet.custom.service.ISysRecipesService; import com.stdiet.custom.service.ISysWapServices; import com.stdiet.system.service.ISysDictTypeService; @@ -11,9 +13,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; +import java.util.List; @RestController @RequestMapping("/wap") @@ -27,6 +27,9 @@ public class SysWapController extends BaseController { @Autowired ISysDictTypeService iSysDictTypeService; + @Autowired + ISysOrderPauseService iSysOrderPauseService; + /** * 客户食谱详情 * @@ -38,6 +41,17 @@ public class SysWapController extends BaseController { return AjaxResult.success(iSysWapServices.getRecipesPlanListInfo(outId)); } + @GetMapping(value = "/recipes/plan/pause/{outId}") + public AjaxResult planPauses(@PathVariable String outId) { + SysOrderPause sysOrderPause = new SysOrderPause(); + sysOrderPause.setOutId(outId); + List list = iSysOrderPauseService.selectSysOrderPauseList(sysOrderPause); + for (SysOrderPause pause : list) { + pause.setCusId(null); + } + return AjaxResult.success(list); + } + /** * 获取用户信息 * diff --git a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrderPause.java b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrderPause.java index ff5b2d792..085ad81dd 100644 --- a/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrderPause.java +++ b/stdiet-custom/src/main/java/com/stdiet/custom/domain/SysOrderPause.java @@ -29,6 +29,8 @@ public class SysOrderPause { private Long cusId; + private String outId; + /** * 服务暂停开始时间 */ diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysOrderPauseMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysOrderPauseMapper.xml index 3493d133a..6f5db35a6 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysOrderPauseMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysOrderPauseMapper.xml @@ -8,6 +8,7 @@ + @@ -24,7 +25,7 @@ - select id, order_id, cus_id, pause_start_date, pause_end_date, reason, remarks, create_time, create_by, update_time, update_by, del_flag from sys_recipes_pause sop + select id, order_id, cus_id, out_id, pause_start_date, pause_end_date, reason, remarks, create_time, create_by, update_time, update_by, del_flag from sys_recipes_pause sop