| | |
| | | import com.oying.modules.rider.domain.RiderWalletInfo; |
| | | import com.oying.modules.rider.service.RiderWalletInfoService; |
| | | import com.oying.modules.rider.domain.dto.RiderWalletInfoQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.http.HttpStatus; |
| | |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "骑手钱包详情") |
| | | @Api(tags = "骑手:骑手钱包详情") |
| | | @RequestMapping("/api/rider/riderWalletInfo") |
| | | public class RiderWalletInfoController { |
| | | |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询骑手钱包详情") |
| | | @PreAuthorize("@el.check('riderWalletInfo:list')") |
| | | public ResponseEntity<PageResult<RiderWalletInfo>> queryRiderWalletInfo(RiderWalletInfoQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryRiderWalletInfo(RiderWalletInfoQueryCriteria criteria){ |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(riderWalletInfoService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(riderWalletInfoService.queryAll(criteria,page)),HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | |
| | | @PreAuthorize("@el.check('riderWalletInfo:add')") |
| | | public ResponseEntity<Object> createRiderWalletInfo(@Validated @RequestBody RiderWalletInfo resources){ |
| | | riderWalletInfoService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(),HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | |
| | | @PreAuthorize("@el.check('riderWalletInfo:edit')") |
| | | public ResponseEntity<Object> updateRiderWalletInfo(@Validated @RequestBody RiderWalletInfo resources){ |
| | | riderWalletInfoService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(),HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('riderWalletInfo:del')") |
| | | public ResponseEntity<Object> deleteRiderWalletInfo(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | riderWalletInfoService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(),HttpStatus.OK); |
| | | } |
| | | |
| | | } |