From 044a57d2133b2363a6f0d3d167b3eaa587c70b91 Mon Sep 17 00:00:00 2001 From: xin <1099200748@qq.com> Date: Thu, 31 Jul 2025 17:18:47 +0800 Subject: [PATCH] Merge branch 'pxb' into xin --- oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java | 71 +++++++++++++++++++++++++---------- 1 files changed, 50 insertions(+), 21 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 9def780..6b046a1 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,10 +5,13 @@ 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.OrderDeliveryPhotosVo; +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 com.oying.utils.StringUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; @@ -37,10 +40,12 @@ private final RiderOrderRecordService riderOrderRecordService; + private final RiderDeliveryPhotosService riderDeliveryPhotosService; + @GetMapping("getRiderSourceInfo/{riderId}") @ApiOperation("查询第三方数据骑手信息") - @PreAuthorize("@el.check('riderInfo:list')") + // @PreAuthorize("@el.check('riderInfo:list')") public ResponseEntity<?> getRiderSourceInfo(@PathVariable Long riderId) { RiderInfo riderInfo = riderInfoService.getRiderSourceInfo(riderId); return ResponseEntity.ok(R.success(riderInfo)); @@ -48,15 +53,15 @@ @GetMapping("syncRiderSourceInfo/{sourcePlatform}") @ApiOperation("同步查询第三方骑手信息 LY") - @PreAuthorize("@el.check('riderInfo:edit')") + // @PreAuthorize("@el.check('riderInfo:edit')") public ResponseEntity<?> syncRiderSourceInfo(@PathVariable String sourcePlatform) { riderInfoService.syncRiderSourceInfo(sourcePlatform); - return ResponseEntity.ok(R.success()); + return ResponseEntity.ok(R.success("操作成功")); } @GetMapping("getRiderWalletInfo/{riderId}") @ApiOperation("查询骑手钱包信息") - @PreAuthorize("@el.check('riderWalletInfo:list')") + // @PreAuthorize("@el.check('riderWalletInfo:list')") public ResponseEntity<?> getRiderWalletInfo(@PathVariable String riderId) { RiderWalletInfo riderWalletInfo = riderWalletInfoService.getRiderWalletInfo(riderId); return ResponseEntity.ok(R.success(riderWalletInfo)); @@ -64,7 +69,7 @@ @GetMapping("getRiderIncomeDetail") @ApiOperation("查询骑手订单收入明细分页") - @PreAuthorize("@el.check('riderIncomeDetail:list')") + // @PreAuthorize("@el.check('riderIncomeDetail:list')") public ResponseEntity<?> getRiderIncomeDetail(RiderIncomeDetailQueryCriteria criteria) { Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); PageResult<RiderIncomeDetail> riderIncomeDetails = riderIncomeDetailService.queryAll(criteria, page); @@ -73,7 +78,7 @@ @GetMapping("getRiderWithdrawalRecord") @ApiOperation("查询骑手提现记录分页") - @PreAuthorize("@el.check('riderWithdrawalRecord:list')") + // @PreAuthorize("@el.check('riderWithdrawalRecord:list')") public ResponseEntity<?> getRiderWithdrawalRecord(RiderWithdrawalRecordQueryCriteria criteria) { Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); PageResult<RiderWithdrawalRecord> riderIncomeDetails = riderWithdrawalRecordService.queryAll(criteria, page); @@ -82,7 +87,7 @@ @GetMapping("getRiderOrderRecord") @ApiOperation("查询骑手订单记录分页") - @PreAuthorize("@el.check('riderOrderRecord:list')") + // @PreAuthorize("@el.check('riderOrderRecord:list')") public ResponseEntity<?> getRiderOrderRecord(RiderOrderRecordQueryCriteria criteria) { Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); PageResult<RiderOrderRecord> riderOrderRecordPageResult = riderOrderRecordService.queryAll(criteria, page); @@ -92,10 +97,10 @@ @GetMapping("riderGrabOrder/{orderNum}") @ApiOperation("骑手接单") - @PreAuthorize("@el.check('riderOrderRecord:list')") + // @PreAuthorize("@el.check('riderOrderRecord:list')") public ResponseEntity<?> riderGrabOrder(@PathVariable String orderNum) { // 订单号不能为空 - if (orderNum == null || orderNum.equals("")) { + if (StringUtils.isBlank(orderNum)) { return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空")); } R result = riderOrderRecordService.riderGrabOrder(orderNum); @@ -104,26 +109,50 @@ @GetMapping("riderCancelOrder/{orderNum}") @ApiOperation("骑手取消接单") - @PreAuthorize("@el.check('riderOrderRecord:list')") + // @PreAuthorize("@el.check('riderOrderRecord:list')") public ResponseEntity<?> riderCancelOrder(@PathVariable String orderNum) { // 订单号不能为空 - if (orderNum == null || orderNum.equals("")) { + if (StringUtils.isBlank(orderNum)) { return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空")); } R result = riderOrderRecordService.riderCancelOrder(orderNum); return ResponseEntity.ok(R.success(result)); } - // @GetMapping("riderCancelOrder/{orderNum}") - // @ApiOperation("骑手订单已送达") + @GetMapping("riderCompleteOrder/{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)); - // } + public ResponseEntity<?> riderCompleteOrder(@PathVariable String orderNum) { + // 订单号不能为空 + if (StringUtils.isBlank(orderNum)) { + return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空")); + } + R result = riderOrderRecordService.riderCompleteOrder(orderNum); + return ResponseEntity.ok(R.success(result)); + } + + @PostMapping("riderOperationOrder") + @ApiOperation("骑手上报到店/取货配送") + // @PreAuthorize("@el.check('riderOrderRecord:list')") + public ResponseEntity<?> riderOperationOrder(@RequestBody OrderRiderOperationVo orderRiderOperationVo) { + // 订单号不能为空 + if (StringUtils.isBlank(orderRiderOperationVo.getOrderNum())) { + return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空")); + } + R result = riderOrderRecordService.riderOperationOrder(orderRiderOperationVo); + return ResponseEntity.ok(R.success(result)); + } + + @PostMapping("riderDeliveryPhotos") + @ApiOperation("骑手上传图片记录") + // @PreAuthorize("@el.check('riderOrderRecord:list')") + public ResponseEntity<?> riderDeliveryPhotos(@RequestBody OrderDeliveryPhotosVo orderDeliveryPhotosVo) { + // 订单号不能为空 + if (StringUtils.isBlank(orderDeliveryPhotosVo.getOrderNum())) { + return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空")); + } + Boolean result = riderDeliveryPhotosService.riderDeliveryPhotos(orderDeliveryPhotosVo); + return ResponseEntity.ok(R.success(result)); + } } -- Gitblit v1.9.3