|
|
@@ -44,8 +44,13 @@ public class AfterSaleOrderController {
|
|
|
@Log(title = "发起售后", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
|
public R add(@Validated @RequestBody AfterSaleOrderDTO dto) {
|
|
|
- this.afterSaleOrderService.add(dto);
|
|
|
- return R.ok();
|
|
|
+ try {
|
|
|
+ afterSaleOrderService.add(dto);
|
|
|
+ return R.ok();
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("发起售后失败", e);
|
|
|
+ return R.fail("发起售后失败");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -102,8 +107,13 @@ public class AfterSaleOrderController {
|
|
|
@Log(title = "同意退款", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping("/agree/refund/{orderId}")
|
|
|
public R agreeRefund(@PathVariable Long orderId) {
|
|
|
- this.afterSaleOrderService.agreeRefund(orderId);
|
|
|
- return R.ok();
|
|
|
+ try {
|
|
|
+ this.afterSaleOrderService.agreeRefund(orderId);
|
|
|
+ return R.ok();
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("同意退款申请失败", e);
|
|
|
+ return R.fail("同意退款申请失败", e.getMessage());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@ApiOperation("商家确认收货")
|