| | |
| | | import com.oying.modules.rider.domain.RiderOrderOperation; |
| | | import com.oying.modules.rider.service.RiderOrderOperationService; |
| | | import com.oying.modules.rider.domain.dto.RiderOrderOperationQueryCriteria; |
| | | 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 = "骑手订单操作日志") |
| | | @RequestMapping("/api/riderOrderOperation") |
| | | @Api(tags = "骑手:骑手订单操作日志") |
| | | @RequestMapping("/api/rider/riderOrderOperation") |
| | | public class RiderOrderOperationController { |
| | | |
| | | private final RiderOrderOperationService riderOrderOperationService; |
| | |
| | | @GetMapping |
| | | @ApiOperation("查询骑手订单操作日志") |
| | | @PreAuthorize("@el.check('riderOrderOperation:list')") |
| | | public ResponseEntity<PageResult<RiderOrderOperation>> queryRiderOrderOperation(RiderOrderOperationQueryCriteria criteria){ |
| | | public ResponseEntity<Object> queryRiderOrderOperation(RiderOrderOperationQueryCriteria criteria) { |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(riderOrderOperationService.queryAll(criteria,page),HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(riderOrderOperationService.queryAll(criteria, page)), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log("新增骑手订单操作日志") |
| | | @ApiOperation("新增骑手订单操作日志") |
| | | @PreAuthorize("@el.check('riderOrderOperation:add')") |
| | | public ResponseEntity<Object> createRiderOrderOperation(@Validated @RequestBody RiderOrderOperation resources){ |
| | | public ResponseEntity<Object> createRiderOrderOperation(@Validated @RequestBody RiderOrderOperation resources) { |
| | | riderOrderOperationService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log("修改骑手订单操作日志") |
| | | @ApiOperation("修改骑手订单操作日志") |
| | | @PreAuthorize("@el.check('riderOrderOperation:edit')") |
| | | public ResponseEntity<Object> updateRiderOrderOperation(@Validated @RequestBody RiderOrderOperation resources){ |
| | | public ResponseEntity<Object> updateRiderOrderOperation(@Validated @RequestBody RiderOrderOperation resources) { |
| | | riderOrderOperationService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | |
| | | @PreAuthorize("@el.check('riderOrderOperation:del')") |
| | | public ResponseEntity<Object> deleteRiderOrderOperation(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | riderOrderOperationService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | return new ResponseEntity<>(R.success(), HttpStatus.OK); |
| | | } |
| | | } |