1.代客下单 失败添加消息提示
This commit is contained in:
parent
f458e6f77e
commit
b7fc525623
|
|
@ -188,12 +188,8 @@ public class TbPlaceController {
|
|||
public ResponseEntity<Object> pay(
|
||||
@Validated @RequestBody PayDTO payDTO
|
||||
) {
|
||||
try {
|
||||
|
||||
return ResponseEntity.ok(tbShopTableService.pay(payDTO));
|
||||
}catch (Exception e) {
|
||||
return ResponseEntity.badRequest().body(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@AnonymousAccess
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ public class TbPayServiceImpl implements TbPayService {
|
|||
return orderInfo;
|
||||
}
|
||||
|
||||
public TbOrderInfo memberAccountPay(String memberId, String shopId, String accountCode, Integer orderId, Double discount) throws Exception {
|
||||
public TbOrderInfo memberAccountPay(String memberId, String shopId, String accountCode, Integer orderId, Double discount) {
|
||||
TbOrderInfo orderInfo = orderInfoMapper.selectOne(new LambdaUpdateWrapper<TbOrderInfo>()
|
||||
.eq(TbOrderInfo::getId, orderId)
|
||||
.eq(TbOrderInfo::getShopId, shopId));
|
||||
|
|
|
|||
|
|
@ -1248,11 +1248,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||
orderInfo = tbPayServiceImpl.scanPay(payDTO);
|
||||
break;
|
||||
case "deposit":
|
||||
try {
|
||||
orderInfo = tbPayServiceImpl.memberAccountPay("", String.valueOf(payDTO.getShopId()), payDTO.getCode(), payDTO.getOrderId(), payDTO.getDiscount());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new BadRequestException("未知支付方式");
|
||||
|
|
|
|||
Loading…
Reference in New Issue