package com.oying.modules.message.rest;
|
|
import com.oying.modules.message.domain.myDto.MesOrderEvaluationDto;
|
import com.oying.modules.message.service.MesOrderEvaluationService;
|
import com.oying.utils.R;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.RequiredArgsConstructor;
|
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 李萌
|
* @date 2025-07-25
|
**/
|
@RestController
|
@RequiredArgsConstructor
|
@Api(tags = "消息中心2.0")
|
@RequestMapping("/api/mesOrderEvaluation")
|
public class MesOrderEvaluationController {
|
|
private final MesOrderEvaluationService mesOrderEvaluationService;
|
//
|
// @ApiOperation("导出数据")
|
// @GetMapping(value = "/download")
|
// @PreAuthorize("@el.check('mesOrderEvaluation:list')")
|
// public void exportMesOrderEvaluation(HttpServletResponse response, MesOrderEvaluationQueryCriteria criteria) throws IOException {
|
// mesOrderEvaluationService.download(mesOrderEvaluationService.queryAll(criteria), response);
|
// }
|
//
|
// @GetMapping
|
// @ApiOperation("查询消息")
|
// @PreAuthorize("@el.check('mesOrderEvaluation:list')")
|
// public ResponseEntity<PageResult<MesOrderEvaluation>> queryMesOrderEvaluation(MesOrderEvaluationQueryCriteria criteria){
|
// Page<Object> page = new Page<>(criteria.getPage(), criteria.getSize());
|
// return new ResponseEntity<>(mesOrderEvaluationService.queryAll(criteria,page),HttpStatus.OK);
|
// }
|
//
|
// @PostMapping
|
// @Log("新增消息")
|
// @ApiOperation("新增消息")
|
// @PreAuthorize("@el.check('mesOrderEvaluation:add')")
|
// public ResponseEntity<Object> createMesOrderEvaluation(@Validated @RequestBody MesOrderEvaluation resources){
|
// mesOrderEvaluationService.create(resources);
|
// return new ResponseEntity<>(HttpStatus.CREATED);
|
// }
|
//
|
// @PutMapping
|
// @Log("修改消息")
|
// @ApiOperation("修改消息")
|
// @PreAuthorize("@el.check('mesOrderEvaluation:edit')")
|
// public ResponseEntity<Object> updateMesOrderEvaluation(@Validated @RequestBody MesOrderEvaluation resources){
|
// mesOrderEvaluationService.update(resources);
|
// return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
// }
|
//
|
// @DeleteMapping
|
// @Log("删除消息")
|
// @ApiOperation("删除消息")
|
// @PreAuthorize("@el.check('mesOrderEvaluation:del')")
|
// public ResponseEntity<Object> deleteMesOrderEvaluation(@ApiParam(value = "传ID数组[]") @RequestBody List<Long> ids) {
|
// mesOrderEvaluationService.deleteAll(ids);
|
// return new ResponseEntity<>(HttpStatus.OK);
|
// }
|
|
//对一个店铺评价 + 打分
|
//order_eval_id, order_item_id, goods_id, goods_name, goods_pic, score, content, imgs, buyer_id
|
@PostMapping("/addShopEvaluation")
|
@ApiOperation("对一个店铺评价 + 打分")
|
public R<Object> addGoodsEvaluation(@RequestBody MesOrderEvaluationDto resources) {
|
try {
|
mesOrderEvaluationService.addShopEvaluation(resources);
|
return R.success();
|
} catch (Exception e) {
|
return R.fail(e.getMessage());
|
}
|
|
}
|
}
|