|
@@ -106,6 +106,22 @@ public class OrderController extends CommonController {
|
|
|
return PageResult.success(result);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ @Operation(summary = "后台订单退款", security = {@SecurityRequirement(name = "Authorization")})
|
|
|
+ @GetMapping("/{id}/refundOrder")
|
|
|
+ public Result<?> refundOrders(
|
|
|
+ @Parameter(description = "订单表ID") @PathVariable String id
|
|
|
+ ) {
|
|
|
+
|
|
|
+ CommonResult<String> process = process(() -> orderService.refundOrder(toolWxConfigService.findConf(), orderService.getById(id)));
|
|
|
+ // 退款失败 更新状态为退款失败
|
|
|
+ if (process.getCode() != 200) {
|
|
|
+ Order order = orderService.getById(id);
|
|
|
+ order.setPayStatus(4);//支付状态:0 未支付 1 已支付 2 退款中 3 已退款 4 退款失败
|
|
|
+ orderService.updateById(order);
|
|
|
+ }
|
|
|
+ return Result.success(process);
|
|
|
+ }
|
|
|
@Operation(summary = "订单表分页列表", security = {@SecurityRequirement(name = "Authorization")})
|
|
|
@GetMapping("/getPageByUserId")
|
|
|
public PageResult<PayOrderVO> getPageByUserId(
|
|
@@ -240,14 +256,7 @@ public class OrderController extends CommonController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @Operation(summary = "后台订单退款", security = {@SecurityRequirement(name = "Authorization")})
|
|
|
- @GetMapping("/{id}/refundOrder")
|
|
|
- public Result<?> refundOrders(
|
|
|
- @Parameter(description = "订单表ID") @PathVariable Long id
|
|
|
- ) {
|
|
|
- CommonResult<String> process = process(() -> orderService.refundOrder(toolWxConfigService.findConf(), orderService.getById(id)));
|
|
|
- return Result.success(process);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 支付回调给微信确认
|