From 65109902bffc7a51d8e8c555fa15d81801e2e487 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 15 Dec 2023 18:15:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/group/BsStoreProductController.java | 12 ++++++------ .../meal/impl/BsMealTableOrderServiceImpl.java | 3 +++ .../service/meal/impl/BsMealTableServiceImpl.java | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cweb/src/main/java/com/cweb/controller/group/BsStoreProductController.java b/cweb/src/main/java/com/cweb/controller/group/BsStoreProductController.java index e70cf9c..64356e9 100644 --- a/cweb/src/main/java/com/cweb/controller/group/BsStoreProductController.java +++ b/cweb/src/main/java/com/cweb/controller/group/BsStoreProductController.java @@ -106,7 +106,7 @@ public class BsStoreProductController { } UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); - if (userInfoModel == null || userInfoModel.getSalesman() == null) { + if (userInfoModel == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "该角色暂无权限"); } @@ -120,8 +120,8 @@ public class BsStoreProductController { storeProduct.setStatus(1); storeProduct.setCreateTime(new Date()); storeProduct.setUpdateTime(new Date()); - storeProduct.setOpId(userInfoModel.getSalesman().getId()); - storeProduct.setOpName(userInfoModel.getSalesman().getName()); + storeProduct.setOpId(userInfoModel.getSecUser().getId()); + storeProduct.setOpName(userInfoModel.getSecUser().getUserName()); storeProduct.setSaleCount(0); storeGroupService.insertStoreProduct(storeProduct); @@ -155,7 +155,7 @@ public class BsStoreProductController { } UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); - if (userInfoModel == null || userInfoModel.getSalesman() == null) { + if (userInfoModel == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "该角色暂无权限"); } @@ -171,8 +171,8 @@ public class BsStoreProductController { bsStoreProduct.setProductCategoryId(category.getId()); bsStoreProduct.setProductCategoryName(category.getName()); bsStoreProduct.setUpdateTime(new Date()); - bsStoreProduct.setOpId(userInfoModel.getSalesman().getId()); - bsStoreProduct.setOpName(userInfoModel.getSalesman().getName()); + bsStoreProduct.setOpId(userInfoModel.getSecUser().getId()); + bsStoreProduct.setOpName(userInfoModel.getSecUser().getUserName()); bsStoreProduct.setName(storeProduct.getName()); bsStoreProduct.setSpec(storeProduct.getSpec()); bsStoreProduct.setPrice(storeProduct.getPrice()); diff --git a/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableOrderServiceImpl.java index 289b666..82cd57a 100644 --- a/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableOrderServiceImpl.java @@ -124,6 +124,9 @@ public class BsMealTableOrderServiceImpl implements BsMealTableOrderService { // 查询订单详情 BsMealTableOrder mealTableOrder = getTableOrderByPayOrderNo(tradeOrder.getOutTradeNo()); if (mealTableOrder != null) { + mealTableOrder.setPayPrice(tradeOrder.getTradeAmount()); + editData(mealTableOrder); + // 关台 mealTableService.endTable(mealTableOrder.getSerialNumber()); } diff --git a/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableServiceImpl.java b/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableServiceImpl.java index c93efcf..aa38115 100644 --- a/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/meal/impl/BsMealTableServiceImpl.java @@ -241,7 +241,7 @@ public class BsMealTableServiceImpl implements BsMealTableService { BsMealTableOrder tableOrder = mealTableOrderService.getCurrentTableOrder(serialNumber); if (tableOrder != null) { tableOrder.setStatus(MealTableOrderStatusEnum.status2.getNumber()); - tableOrder.setPayStatus(MealTableOrderPayStatusEnum.status2.getNumber()); + tableOrder.setPayStatus(MealTableOrderPayStatusEnum.status3.getNumber()); tableOrder.setPayTime(new Date()); mealTableOrderService.editData(tableOrder);