1.代客下单 失败添加消息提示

This commit is contained in:
SongZhang 2024-09-05 14:57:15 +08:00
parent a08d181e77
commit 7b91549664
1 changed files with 6 additions and 1 deletions

View File

@ -188,7 +188,12 @@ public class TbPlaceController {
public ResponseEntity<Object> pay(
@Validated @RequestBody PayDTO payDTO
) {
return ResponseEntity.ok(tbShopTableService.pay(payDTO));
try {
return ResponseEntity.ok(tbShopTableService.pay(payDTO));
}catch (Exception e) {
return ResponseEntity.badRequest().body(e.getMessage());
}
}
@AnonymousAccess