| | |
| | | import com.oying.modules.rider.domain.dto.RiderIncomeDetailQueryCriteria; |
| | | import com.oying.modules.rider.service.RiderIncomeDetailService; |
| | | import com.oying.modules.rider.domain.RiderIncomeDetail; |
| | | import com.oying.utils.R; |
| | | import lombok.RequiredArgsConstructor; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import io.swagger.annotations.*; |
| | | |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.oying.utils.PageResult; |
| | | |
| | | /** |
| | | * @author pxb |
| | | * @date 2025-06-18 |
| | | **/ |
| | | * @author pxb |
| | | * @date 2025-06-18 |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "骑手收入明细") |
| | | @Api(tags = "骑手:骑手收入明细") |
| | | @RequestMapping("/api/rider/riderIncomeDetail") |
| | | public class RiderIncomeDetailController { |
| | | |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询骑手收入明细") |
| | | @PreAuthorize("@el.check('riderIncomeDetail:list')") |
| | | public ResponseEntity<PageResult<RiderIncomeDetail>> queryRiderIncomeDetail(RiderIncomeDetailQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryRiderIncomeDetail(RiderIncomeDetailQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(riderIncomeDetailService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(riderIncomeDetailService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log("新增骑手收入明细") |
| | | @ApiOperation("新增骑手收入明细") |
| | | @PreAuthorize("@el.check('riderIncomeDetail:add')") |
| | | public ResponseEntity<Object> createRiderIncomeDetail(@Validated @RequestBody RiderIncomeDetail resources){ |
| | | public ResponseEntity<Object> createRiderIncomeDetail(@Validated @RequestBody RiderIncomeDetail resources) { |
| | | riderIncomeDetailService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log("修改骑手收入明细") |
| | | @ApiOperation("修改骑手收入明细") |
| | | @PreAuthorize("@el.check('riderIncomeDetail:edit')") |
| | | public ResponseEntity<Object> updateRiderIncomeDetail(@Validated @RequestBody RiderIncomeDetail resources){ |
| | | public ResponseEntity<Object> updateRiderIncomeDetail(@Validated @RequestBody RiderIncomeDetail resources) { |
| | | riderIncomeDetailService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('riderIncomeDetail:del')") |
| | | public ResponseEntity<Object> deleteRiderIncomeDetail(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | riderIncomeDetailService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |