Merge branch 'refs/heads/分账重构'
This commit is contained in:
@ -63,14 +63,14 @@ public class AppDiningPlatesController {
|
|||||||
@GetMapping("/checkBind")
|
@GetMapping("/checkBind")
|
||||||
@Operation(summary = "验证餐盘绑定")
|
@Operation(summary = "验证餐盘绑定")
|
||||||
public CommonResult<AppUserInfoCardVO> checkBind(String diningPlatesNum,Long storeId) {
|
public CommonResult<AppUserInfoCardVO> checkBind(String diningPlatesNum,Long storeId) {
|
||||||
storeId = getCarteen();
|
storeId = getCarteen(storeId);
|
||||||
return success(diningPlatesService.appCheckBind(diningPlatesNum,storeId));
|
return success(diningPlatesService.appCheckBind(diningPlatesNum,storeId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/unbind")
|
@GetMapping("/unbind")
|
||||||
@Operation(summary = "餐盘解绑")
|
@Operation(summary = "餐盘解绑")
|
||||||
public CommonResult<String> unbind(String diningPlatesNum,Long storeId) {
|
public CommonResult<String> unbind(String diningPlatesNum,Long storeId) {
|
||||||
storeId = getCarteen();
|
storeId = getCarteen(storeId);
|
||||||
diningPlatesService.unbind(diningPlatesNum,storeId);
|
diningPlatesService.unbind(diningPlatesNum,storeId);
|
||||||
return success(diningPlatesNum);
|
return success(diningPlatesNum);
|
||||||
}
|
}
|
||||||
@ -78,7 +78,7 @@ public class AppDiningPlatesController {
|
|||||||
@GetMapping("/getUserAndDish")
|
@GetMapping("/getUserAndDish")
|
||||||
@Operation(summary = "根据餐盘号获取当前余额")
|
@Operation(summary = "根据餐盘号获取当前余额")
|
||||||
public CommonResult<AppUserInfo> getMoney(String cId, Long dishesId,Long storeId) {
|
public CommonResult<AppUserInfo> getMoney(String cId, Long dishesId,Long storeId) {
|
||||||
storeId = getCarteen();
|
storeId = getCarteen(storeId);
|
||||||
return success(diningPlatesService.getMoney(cId,dishesId,storeId));
|
return success(diningPlatesService.getMoney(cId,dishesId,storeId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ public class AppDiningPlatesController {
|
|||||||
@GetMapping("/checkBindAndUnBind")
|
@GetMapping("/checkBindAndUnBind")
|
||||||
@Operation(summary = "餐盘解绑")
|
@Operation(summary = "餐盘解绑")
|
||||||
public CommonResult<String> checkBindAndUnBind(String diningPlatesNum,Long storeId) {
|
public CommonResult<String> checkBindAndUnBind(String diningPlatesNum,Long storeId) {
|
||||||
storeId = getCarteen();
|
storeId = getCarteen(storeId);
|
||||||
String b = diningPlatesService.checkBindAndUnBind(diningPlatesNum, storeId);
|
String b = diningPlatesService.checkBindAndUnBind(diningPlatesNum, storeId);
|
||||||
CommonResult<String> result = new CommonResult<>();
|
CommonResult<String> result = new CommonResult<>();
|
||||||
result.setCode(200);
|
result.setCode(200);
|
||||||
@ -109,7 +109,10 @@ public class AppDiningPlatesController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Long getCarteen() {
|
public Long getCarteen(Long storeId) {
|
||||||
|
if (storeId != null){
|
||||||
|
return storeId;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
String authorization = httpServletRequest.getHeader("Authorization");
|
String authorization = httpServletRequest.getHeader("Authorization");
|
||||||
Long carteen = deviceInfoApi.getCarteen(authorization);
|
Long carteen = deviceInfoApi.getCarteen(authorization);
|
||||||
|
Reference in New Issue
Block a user