优化门店ID获取方式
This commit is contained in:
		| @ -63,14 +63,14 @@ public class AppDiningPlatesController { | ||||
|     @GetMapping("/checkBind") | ||||
|     @Operation(summary = "验证餐盘绑定") | ||||
|     public CommonResult<AppUserInfoCardVO> checkBind(String diningPlatesNum,Long storeId) { | ||||
|         storeId  = getCarteen(); | ||||
|         storeId  = getCarteen(storeId); | ||||
|         return success(diningPlatesService.appCheckBind(diningPlatesNum,storeId)); | ||||
|     } | ||||
|  | ||||
|     @GetMapping("/unbind") | ||||
|     @Operation(summary = "餐盘解绑") | ||||
|     public CommonResult<String> 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<AppUserInfo> 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<String> checkBindAndUnBind(String diningPlatesNum,Long storeId) { | ||||
|         storeId  = getCarteen(); | ||||
|         storeId  = getCarteen(storeId); | ||||
|         String b = diningPlatesService.checkBindAndUnBind(diningPlatesNum, storeId); | ||||
|         CommonResult<String> 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); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 zengtao01
					zengtao01