diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/diningplates/AppDiningPlatesController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/diningplates/AppDiningPlatesController.java index dc220141..f165d488 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/diningplates/AppDiningPlatesController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/app/diningplates/AppDiningPlatesController.java @@ -63,14 +63,14 @@ public class AppDiningPlatesController { @GetMapping("/checkBind") @Operation(summary = "验证餐盘绑定") public CommonResult checkBind(String diningPlatesNum,Long storeId) { - storeId = getCarteen(); + storeId = getCarteen(storeId); return success(diningPlatesService.appCheckBind(diningPlatesNum,storeId)); } @GetMapping("/unbind") @Operation(summary = "餐盘解绑") public CommonResult unbind(String diningPlatesNum,Long storeId) { - storeId = getCarteen(); + storeId = getCarteen(storeId); diningPlatesService.unbind(diningPlatesNum,storeId); return success(diningPlatesNum); } @@ -78,7 +78,7 @@ public class AppDiningPlatesController { @GetMapping("/getUserAndDish") @Operation(summary = "根据餐盘号获取当前余额") public CommonResult getMoney(String cId, Long dishesId,Long storeId) { - storeId = getCarteen(); + storeId = getCarteen(storeId); return success(diningPlatesService.getMoney(cId,dishesId,storeId)); } @@ -91,7 +91,7 @@ public class AppDiningPlatesController { @GetMapping("/checkBindAndUnBind") @Operation(summary = "餐盘解绑") public CommonResult checkBindAndUnBind(String diningPlatesNum,Long storeId) { - storeId = getCarteen(); + storeId = getCarteen(storeId); String b = diningPlatesService.checkBindAndUnBind(diningPlatesNum, storeId); CommonResult result = new CommonResult<>(); result.setCode(200); @@ -109,7 +109,10 @@ public class AppDiningPlatesController { } - public Long getCarteen() { + public Long getCarteen(Long storeId) { + if (storeId != null){ + return storeId; + } try { String authorization = httpServletRequest.getHeader("Authorization"); Long carteen = deviceInfoApi.getCarteen(authorization);