| | |
| | | package com.oying.modules.message.rest; |
| | | |
| | | import com.oying.annotation.Log; |
| | | import com.oying.modules.message.domain.MesOrderItemEvaluationDto; |
| | | import com.oying.modules.message.domain.MesRiderEvaluation; |
| | | import com.oying.modules.message.domain.myDto.MesRiderEvaluationDto; |
| | | import com.oying.modules.message.service.MesRiderEvaluationService; |
| | | import com.oying.modules.message.domain.dto.MesRiderEvaluationQueryCriteria; |
| | | import com.oying.utils.R; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * @author 李萌 |
| | |
| | | **/ |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @Api(tags = "消息") |
| | | @Api(tags = "消息中心2.0") |
| | | @RequestMapping("/api/mesRiderEvaluation") |
| | | public class MesRiderEvaluationController { |
| | | |
| | | private final MesRiderEvaluationService mesRiderEvaluationService; |
| | | |
| | | @ApiOperation("导出数据") |
| | | @GetMapping(value = "/download") |
| | | @PreAuthorize("@el.check('mesRiderEvaluation:list')") |
| | | public void exportMesRiderEvaluation(HttpServletResponse response, MesRiderEvaluationQueryCriteria criteria) throws IOException { |
| | | mesRiderEvaluationService.download(mesRiderEvaluationService.queryAll(criteria), response); |
| | | } |
| | | |
| | | @GetMapping |
| | | @ApiOperation("查询消息") |
| | | @PreAuthorize("@el.check('mesRiderEvaluation:list')") |
| | | public ResponseEntity<PageResult<MesRiderEvaluation>> queryMesRiderEvaluation(MesRiderEvaluationQueryCriteria criteria){ |
| | | Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | return new ResponseEntity<>(mesRiderEvaluationService.queryAll(criteria,page),HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping |
| | | @Log("新增消息") |
| | | @ApiOperation("新增消息") |
| | | @PreAuthorize("@el.check('mesRiderEvaluation:add')") |
| | | public ResponseEntity<Object> createMesRiderEvaluation(@Validated @RequestBody MesRiderEvaluation resources){ |
| | | mesRiderEvaluationService.create(resources); |
| | | return new ResponseEntity<>(HttpStatus.CREATED); |
| | | } |
| | | |
| | | @PutMapping |
| | | @Log("修改消息") |
| | | @ApiOperation("修改消息") |
| | | @PreAuthorize("@el.check('mesRiderEvaluation:edit')") |
| | | public ResponseEntity<Object> updateMesRiderEvaluation(@Validated @RequestBody MesRiderEvaluation resources){ |
| | | mesRiderEvaluationService.update(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @Log("删除消息") |
| | | @ApiOperation("删除消息") |
| | | @PreAuthorize("@el.check('mesRiderEvaluation:del')") |
| | | public ResponseEntity<Object> deleteMesRiderEvaluation(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | mesRiderEvaluationService.deleteAll(ids); |
| | | return new ResponseEntity<>(HttpStatus.OK); |
| | | } |
| | | // @ApiOperation("导出数据") |
| | | // @GetMapping(value = "/download") |
| | | // @PreAuthorize("@el.check('mesRiderEvaluation:list')") |
| | | // public void exportMesRiderEvaluation(HttpServletResponse response, MesRiderEvaluationQueryCriteria criteria) throws IOException { |
| | | // mesRiderEvaluationService.download(mesRiderEvaluationService.queryAll(criteria), response); |
| | | // } |
| | | // |
| | | // @GetMapping |
| | | // @ApiOperation("查询消息") |
| | | // @PreAuthorize("@el.check('mesRiderEvaluation:list')") |
| | | // public ResponseEntity<PageResult<MesRiderEvaluation>> queryMesRiderEvaluation(MesRiderEvaluationQueryCriteria criteria){ |
| | | // Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize()); |
| | | // return new ResponseEntity<>(mesRiderEvaluationService.queryAll(criteria,page),HttpStatus.OK); |
| | | // } |
| | | // |
| | | // @PostMapping |
| | | // @Log("新增消息") |
| | | // @ApiOperation("新增消息") |
| | | // @PreAuthorize("@el.check('mesRiderEvaluation:add')") |
| | | // public ResponseEntity<Object> createMesRiderEvaluation(@Validated @RequestBody MesRiderEvaluation resources){ |
| | | // mesRiderEvaluationService.create(resources); |
| | | // return new ResponseEntity<>(HttpStatus.CREATED); |
| | | // } |
| | | // |
| | | // @PutMapping |
| | | // @Log("修改消息") |
| | | // @ApiOperation("修改消息") |
| | | // @PreAuthorize("@el.check('mesRiderEvaluation:edit')") |
| | | // public ResponseEntity<Object> updateMesRiderEvaluation(@Validated @RequestBody MesRiderEvaluation resources){ |
| | | // mesRiderEvaluationService.update(resources); |
| | | // return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | // } |
| | | // |
| | | // @DeleteMapping |
| | | // @Log("删除消息") |
| | | // @ApiOperation("删除消息") |
| | | // @PreAuthorize("@el.check('mesRiderEvaluation:del')") |
| | | // public ResponseEntity<Object> deleteMesRiderEvaluation(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) { |
| | | // mesRiderEvaluationService.deleteAll(ids); |
| | | // return new ResponseEntity<>(HttpStatus.OK); |
| | | // } |
| | | |
| | | //对一个骑手评价 + 打分 |
| | | // |