From d96bafe1a76327d61a32c2c3998b6dc7b888a9ce Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Tue, 15 Jul 2025 19:31:03 +0800
Subject: [PATCH] 支付回调

---
 oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java |   67 ++++++++++++++++++++++++++++++++-
 1 files changed, 65 insertions(+), 2 deletions(-)

diff --git a/oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java b/oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java
index 5d81a0c..06ec841 100644
--- a/oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java
+++ b/oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java
@@ -5,7 +5,9 @@
 import com.oying.modules.rider.domain.dto.RiderIncomeDetailQueryCriteria;
 import com.oying.modules.rider.domain.dto.RiderOrderRecordQueryCriteria;
 import com.oying.modules.rider.domain.dto.RiderWithdrawalRecordQueryCriteria;
+import com.oying.modules.rider.domain.vo.OrderRiderOperationVo;
 import com.oying.modules.rider.service.*;
+import com.oying.modules.rider.utils.Constants;
 import com.oying.utils.PageResult;
 import com.oying.utils.R;
 import io.swagger.annotations.Api;
@@ -22,7 +24,7 @@
  **/
 @RestController
 @RequiredArgsConstructor
-@Api(tags = "骑手微信小程序接口")
+@Api(tags = "骑手小程序:骑手微信小程序接口")
 @RequestMapping("/api/wx/rider")
 public class WxRiderController {
 
@@ -40,7 +42,7 @@
     @GetMapping("getRiderSourceInfo/{riderId}")
     @ApiOperation("查询第三方数据骑手信息")
     @PreAuthorize("@el.check('riderInfo:list')")
-    public ResponseEntity<?> getRiderSourceInfo(@PathVariable String riderId) {
+    public ResponseEntity<?> getRiderSourceInfo(@PathVariable Long riderId) {
         RiderInfo riderInfo = riderInfoService.getRiderSourceInfo(riderId);
         return ResponseEntity.ok(R.success(riderInfo));
     }
@@ -88,4 +90,65 @@
         return ResponseEntity.ok(R.success(riderOrderRecordPageResult));
     }
 
+
+    @GetMapping("riderGrabOrder/{orderNum}")
+    @ApiOperation("骑手接单")
+    @PreAuthorize("@el.check('riderOrderRecord:list')")
+    public ResponseEntity<?> riderGrabOrder(@PathVariable String orderNum) {
+        // 订单号不能为空
+        if (orderNum == null || orderNum.equals("")) {
+            return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
+        }
+        R result = riderOrderRecordService.riderGrabOrder(orderNum);
+        return ResponseEntity.ok(result);
+    }
+
+    @GetMapping("riderCancelOrder/{orderNum}")
+    @ApiOperation("骑手取消接单")
+    @PreAuthorize("@el.check('riderOrderRecord:list')")
+    public ResponseEntity<?> riderCancelOrder(@PathVariable String orderNum) {
+        // 订单号不能为空
+        if (orderNum == null || orderNum.equals("")) {
+            return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
+        }
+        R result = riderOrderRecordService.riderCancelOrder(orderNum);
+        return ResponseEntity.ok(R.success(result));
+    }
+
+    // @GetMapping("riderCancelOrder/{orderNum}")
+    // @ApiOperation("骑手订单已送达")
+    // @PreAuthorize("@el.check('riderOrderRecord:list')")
+    // public ResponseEntity<?> riderCancelOrder(@PathVariable String orderNum) {
+    //     // 订单号不能为空
+    //     if (orderNum == null || orderNum.equals("")) {
+    //         return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
+    //     }
+    //     R result = riderOrderRecordService.riderCancelOrder(orderNum);
+    //     return ResponseEntity.ok(R.success(result));
+    // }
+
+    @GetMapping("riderOperationOrder")
+    @ApiOperation("骑手上报到店")
+    @PreAuthorize("@el.check('riderOrderRecord:list')")
+    public ResponseEntity<?> riderOperationOrder(OrderRiderOperationVo orderRiderOperation) {
+        // 订单号不能为空
+        if (orderRiderOperation.getOrderNum() == null || orderRiderOperation.getOrderNum().equals("")) {
+            return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
+        }
+        R result = riderOrderRecordService.riderOperationOrder(orderRiderOperation);
+        return ResponseEntity.ok(R.success(result));
+    }
+
+    // @GetMapping("riderCancelOrder/{orderNum}")
+    // @ApiOperation("骑手已取餐")
+    // @PreAuthorize("@el.check('riderOrderRecord:list')")
+    // public ResponseEntity<?> riderCancelOrder(@PathVariable String orderNum) {
+    //     // 订单号不能为空
+    //     if (orderNum == null || orderNum.equals("")) {
+    //         return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
+    //     }
+    //     R result = riderOrderRecordService.riderCancelOrder(orderNum);
+    //     return ResponseEntity.ok(R.success(result));
+    // }
+
 }

--
Gitblit v1.9.3