From 22733a6ca924ecbf4971f936a1a1138d1112f12d Mon Sep 17 00:00:00 2001 From: 彭雪彬 <1724387007@qq.com> Date: Mon, 14 Jul 2025 18:35:37 +0800 Subject: [PATCH] 骑手接单 --- oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java | 40 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 39 insertions(+), 1 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 2adcfa4..9def780 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 @@ -6,6 +6,7 @@ import com.oying.modules.rider.domain.dto.RiderOrderRecordQueryCriteria; import com.oying.modules.rider.domain.dto.RiderWithdrawalRecordQueryCriteria; 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; @@ -40,7 +41,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 +89,41 @@ 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)); + // } + } -- Gitblit v1.9.3