彭雪彬
2025-09-04 9534df9c12adc71274c994df8765c788222a0f7b
返回抛出异常
1 files modified
11 ■■■■ changed files
oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java 11 ●●●● patch | view | raw | blame | history
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.exception.BadRequestException;
import com.oying.modules.rider.domain.*;
import com.oying.modules.rider.domain.dto.RiderIncomeDetailQueryCriteria;
import com.oying.modules.rider.domain.dto.RiderOrderRecordQueryCriteria;
@@ -101,7 +102,7 @@
    public ResponseEntity<?> riderGrabOrder(@PathVariable String orderNum) {
        // 订单号不能为空
        if (StringUtils.isBlank(orderNum)) {
            return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
            throw new BadRequestException("订单号不能为空");
        }
        R result = riderOrderRecordService.riderGrabOrder(orderNum);
        return ResponseEntity.ok(result);
@@ -113,7 +114,7 @@
    public ResponseEntity<?> riderCancelOrder(@PathVariable String orderNum) {
        // 订单号不能为空
        if (StringUtils.isBlank(orderNum)) {
            return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
            throw new BadRequestException("订单号不能为空");
        }
        R result = riderOrderRecordService.riderCancelOrder(orderNum);
        return ResponseEntity.ok(R.success(result));
@@ -125,7 +126,7 @@
    public ResponseEntity<?> riderCompleteOrder(@PathVariable String orderNum) {
        // 订单号不能为空
        if (StringUtils.isBlank(orderNum)) {
            return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
            throw new BadRequestException("订单号不能为空");
        }
        R result = riderOrderRecordService.riderCompleteOrder(orderNum);
        return ResponseEntity.ok(R.success(result));
@@ -137,7 +138,7 @@
    public ResponseEntity<?> riderOperationOrder(@RequestBody OrderRiderOperationVo orderRiderOperationVo) {
        // 订单号不能为空
        if (StringUtils.isBlank(orderRiderOperationVo.getOrderNum())) {
            return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
            throw new BadRequestException("订单号不能为空");
        }
        R result = riderOrderRecordService.riderOperationOrder(orderRiderOperationVo);
        return ResponseEntity.ok(R.success(result));
@@ -149,7 +150,7 @@
    public ResponseEntity<?> riderDeliveryPhotos(@RequestBody OrderDeliveryPhotosVo orderDeliveryPhotosVo) {
        // 订单号不能为空
        if (StringUtils.isBlank(orderDeliveryPhotosVo.getOrderNum())) {
            return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
            throw new BadRequestException("订单号不能为空");
        }
        Boolean result = riderDeliveryPhotosService.riderDeliveryPhotos(orderDeliveryPhotosVo);
        return ResponseEntity.ok(R.success(result));