From 4a9de05ddd680d96c0010d31289bb36482a9c473 Mon Sep 17 00:00:00 2001 From: 陶杰 <1378534974@qq.com> Date: 星期三, 09 十月 2024 13:41:55 +0800 Subject: [PATCH] 1.商品评论-增加显示隐藏 2.商品统计-隐藏不统计 3.商品评论-增加回复 --- src/main/java/com/mzl/flower/web/v2/comment/FlowerCommentController.java | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/mzl/flower/web/v2/comment/FlowerCommentController.java b/src/main/java/com/mzl/flower/web/v2/comment/FlowerCommentController.java index 4574f21..f4aff8b 100644 --- a/src/main/java/com/mzl/flower/web/v2/comment/FlowerCommentController.java +++ b/src/main/java/com/mzl/flower/web/v2/comment/FlowerCommentController.java @@ -6,10 +6,7 @@ import com.mzl.flower.base.R; import com.mzl.flower.base.ReturnDataDTO; import com.mzl.flower.config.exception.ValidationException; -import com.mzl.flower.dto.request.comment.CreateFlowerCommentBatchDTO; -import com.mzl.flower.dto.request.comment.CreateFlowerCommentDTO; -import com.mzl.flower.dto.request.comment.QueryFlowerCommentDTO; -import com.mzl.flower.dto.request.comment.UpdateFlowerCommentDTO; +import com.mzl.flower.dto.request.comment.*; import com.mzl.flower.dto.response.comment.FlowerCommentVO; import com.mzl.flower.dto.response.coupon.CouponTemplatePointVO; import com.mzl.flower.dto.response.coupon.CouponTemplateVO; @@ -120,6 +117,26 @@ return returnData(R.SUCCESS.getCode(), flowerCommentService.getSupplierStatis(id)); } + @PutMapping("/show/{id}") + @ApiOperation(value = "显示/隐藏", notes = "显示/隐藏") + public ResponseEntity<ReturnDataDTO> updateShow(@PathVariable String id,@Validated @RequestBody ShowFlowerCommentDTO dto) { + + // 手动设置id值 + dto.setId(id); + flowerCommentService.updateShowFlowerComment(dto); + return returnData(R.SUCCESS.getCode(), null); + } + + @PutMapping("/replay/{id}") + @ApiOperation(value = "评论回复", notes = "评论回复") + public ResponseEntity<ReturnDataDTO> updateReplay(@PathVariable String id,@Validated @RequestBody ReplayFlowerCommentDTO dto) { + + // 手动设置id值 + dto.setId(id); + flowerCommentService.updateReplayFlowerComment(dto); + return returnData(R.SUCCESS.getCode(), null); + } + private void valid(CreateFlowerCommentDTO dto){ } -- Gitblit v1.9.3