| | |
| | | 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; |
| | |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "骑手微信小程序接口") |
| | | @Api(tags = "骑手小程序:骑手微信小程序接口") |
| | | @RequestMapping("/api/wx/rider") |
| | | public class WxRiderController { |
| | | |
| | |
| | | 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)); |
| | | } |
| | | |
| | | } |