| | |
| | | import com.oying.modules.rider.domain.RiderWithdrawalRecord; |
| | | import com.oying.modules.rider.service.RiderWithdrawalRecordService; |
| | | import com.oying.modules.rider.domain.dto.RiderWithdrawalRecordQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.http.HttpStatus; |
| | |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "骑手提现记录") |
| | | @RequestMapping("/api/riderWithdrawalRecord") |
| | | @Api(tags = "骑手:骑手提现记录") |
| | | @RequestMapping("/api/rider/riderWithdrawalRecord") |
| | | public class RiderWithdrawalRecordController { |
| | | |
| | | private final RiderWithdrawalRecordService riderWithdrawalRecordService; |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询骑手提现记录") |
| | | @PreAuthorize("@el.check('riderWithdrawalRecord:list')") |
| | | public ResponseEntity<PageResult<RiderWithdrawalRecord>> queryRiderWithdrawalRecord(RiderWithdrawalRecordQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryRiderWithdrawalRecord(RiderWithdrawalRecordQueryCriteria criteria){ |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(riderWithdrawalRecordService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(riderWithdrawalRecordService.queryAll(criteria,page)),HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('riderWithdrawalRecord:add')") |
| | | public ResponseEntity<Object> createRiderWithdrawalRecord(@Validated @RequestBody RiderWithdrawalRecord resources){ |
| | | riderWithdrawalRecordService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(),HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('riderWithdrawalRecord:edit')") |
| | | public ResponseEntity<Object> updateRiderWithdrawalRecord(@Validated @RequestBody RiderWithdrawalRecord resources){ |
| | | riderWithdrawalRecordService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(),HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('riderWithdrawalRecord:del')") |
| | | public ResponseEntity<Object> deleteRiderWithdrawalRecord(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | riderWithdrawalRecordService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(),HttpStatus.OK); |
| | | } |
| | | } |