From af127949c7a1f24f409eea5eb8d14554564749c4 Mon Sep 17 00:00:00 2001
From: 彭雪彬 <1724387007@qq.com>
Date: Mon, 15 Sep 2025 11:31:28 +0800
Subject: [PATCH] 骑手同步认证信息抛异常

---
 oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java |   24 ++++++++++++++----------
 1 files changed, 14 insertions(+), 10 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 a67cab8..e49e0bb 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
@@ -1,6 +1,7 @@
 package com.oying.modules.rider.rest;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.oying.domain.BucketStorage;
 import com.oying.exception.BadRequestException;
 import com.oying.modules.rider.domain.*;
 import com.oying.modules.rider.domain.dto.RiderIncomeDetailQueryCriteria;
@@ -10,15 +11,15 @@
 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 com.oying.service.BucketStorageService;
+import com.oying.utils.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.RequiredArgsConstructor;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 
 /**
@@ -48,7 +49,7 @@
     @ApiOperation("查询第三方数据骑手信息")
     // @PreAuthorize("@el.check('riderInfo:list')")
     public ResponseEntity<?> getRiderSourceInfo(@PathVariable Long riderId) {
-        RiderInfo riderInfo = riderInfoService.getRiderSourceInfo(riderId);
+        RiderInfo riderInfo = riderInfoService.getRiderSourceInfo(SecurityUtils.getCurrentUserId());
         return ResponseEntity.ok(R.success(riderInfo));
     }
 
@@ -56,15 +57,15 @@
     @ApiOperation("同步查询第三方骑手信息 LY")
     // @PreAuthorize("@el.check('riderInfo:edit')")
     public ResponseEntity<?> syncRiderSourceInfo(@PathVariable String sourcePlatform) {
-        riderInfoService.syncRiderSourceInfo(sourcePlatform);
-        return ResponseEntity.ok(R.success("操作成功"));
+        R result = riderInfoService.syncRiderSourceInfo(sourcePlatform);
+        return ResponseEntity.ok(result);
     }
 
     @GetMapping("getRiderWalletInfo/{riderId}")
     @ApiOperation("查询骑手钱包信息")
     // @PreAuthorize("@el.check('riderWalletInfo:list')")
     public ResponseEntity<?> getRiderWalletInfo(@PathVariable String riderId) {
-        RiderWalletInfo riderWalletInfo = riderWalletInfoService.getRiderWalletInfo(riderId);
+        RiderWalletInfo riderWalletInfo = riderWalletInfoService.getRiderWalletInfo(SecurityUtils.getCurrentUserId());
         return ResponseEntity.ok(R.success(riderWalletInfo));
     }
 
@@ -72,6 +73,7 @@
     @ApiOperation("查询骑手订单收入明细分页")
     // @PreAuthorize("@el.check('riderIncomeDetail:list')")
     public ResponseEntity<?> getRiderIncomeDetail(RiderIncomeDetailQueryCriteria criteria) {
+        criteria.setRiderId(SecurityUtils.getCurrentUserId());
         Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
         PageResult<RiderIncomeDetail> riderIncomeDetails = riderIncomeDetailService.queryAll(criteria, page);
         return ResponseEntity.ok(R.success(riderIncomeDetails));
@@ -81,6 +83,7 @@
     @ApiOperation("查询骑手提现记录分页")
     // @PreAuthorize("@el.check('riderWithdrawalRecord:list')")
     public ResponseEntity<?> getRiderWithdrawalRecord(RiderWithdrawalRecordQueryCriteria criteria) {
+        criteria.setRiderId(SecurityUtils.getCurrentUserId());
         Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
         PageResult<RiderWithdrawalRecord> riderIncomeDetails = riderWithdrawalRecordService.queryAll(criteria, page);
         return ResponseEntity.ok(R.success(riderIncomeDetails));
@@ -90,6 +93,7 @@
     @ApiOperation("查询骑手订单记录分页")
     // @PreAuthorize("@el.check('riderOrderRecord:list')")
     public ResponseEntity<?> getRiderOrderRecord(RiderOrderRecordQueryCriteria criteria) {
+        criteria.setRiderId(SecurityUtils.getCurrentUserId());
         Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
         PageResult<RiderOrderRecord> riderOrderRecordPageResult = riderOrderRecordService.queryAll(criteria, page);
         return ResponseEntity.ok(R.success(riderOrderRecordPageResult));
@@ -145,14 +149,14 @@
     }
 
     @PostMapping("riderDeliveryPhotos")
-    @ApiOperation("骑手上传图片记录")
+    @ApiOperation("骑手上传图片")
     // @PreAuthorize("@el.check('riderOrderRecord:list')")
-    public ResponseEntity<?> riderDeliveryPhotos(@RequestBody OrderDeliveryPhotosVo orderDeliveryPhotosVo) {
+    public ResponseEntity<?> riderDeliveryPhotos(OrderDeliveryPhotosVo orderDeliveryPhotosVo) {
         // 订单号不能为空
         if (StringUtils.isBlank(orderDeliveryPhotosVo.getOrderNum())) {
             throw new BadRequestException("订单号不能为空");
         }
-        Boolean result = riderDeliveryPhotosService.riderDeliveryPhotos(orderDeliveryPhotosVo);
+        RiderDeliveryPhotos result = riderDeliveryPhotosService.riderDeliveryPhotos(orderDeliveryPhotosVo);
         return ResponseEntity.ok(R.success(result));
     }
 

--
Gitblit v1.9.3