xin
2025-07-16 6269dc7a50d5028fa616b339cfe790b6e0d5d16e
oying-system/src/main/java/com/oying/modules/rider/rest/WxRiderController.java
@@ -41,7 +41,7 @@
    @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));
@@ -49,15 +49,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));
@@ -65,7 +65,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);
@@ -74,7 +74,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);
@@ -83,7 +83,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);
@@ -93,7 +93,7 @@
    @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("")) {
@@ -105,7 +105,7 @@
    @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("")) {
@@ -115,22 +115,22 @@
        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 (orderNum == null || orderNum.equals("")) {
            return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
        }
        R result = riderOrderRecordService.riderCompleteOrder(orderNum);
        return ResponseEntity.ok(R.success(result));
    }
    @GetMapping("riderOperationOrder")
    @ApiOperation("骑手上报到店")
    @PreAuthorize("@el.check('riderOrderRecord:list')")
    public ResponseEntity<?> riderOperationOrder(OrderRiderOperationVo orderRiderOperation) {
    @PostMapping("riderOperationOrder")
    @ApiOperation("骑手上报到店/取货配送")
    // @PreAuthorize("@el.check('riderOrderRecord:list')")
    public ResponseEntity<?> riderOperationOrder(@RequestBody OrderRiderOperationVo orderRiderOperation) {
        // 订单号不能为空
        if (orderRiderOperation.getOrderNum() == null || orderRiderOperation.getOrderNum().equals("")) {
            return ResponseEntity.ok(R.fail(Constants.HTTP_CODE_FAIL, "订单号不能为空"));
@@ -138,17 +138,5 @@
        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));
    // }
}