|
@@ -0,0 +1,66 @@
|
|
|
+package com.gree.mall.contest.controller.pc.order;
|
|
|
+
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.gree.mall.contest.helper.ResponseHelper;
|
|
|
+import com.gree.mall.contest.logic.order.CommentTagLogic;
|
|
|
+import com.gree.mall.contest.plus.entity.CommentTag;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
+import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@Tag(name = "评价标签管理API", description = "评价标签管理API")
|
|
|
+@RequestMapping(value = "/pc/comment/tag", produces = "application/json; charset=utf-8")
|
|
|
+@RequiredArgsConstructor
|
|
|
+public class CommentTagController {
|
|
|
+
|
|
|
+ private final CommentTagLogic commentTagLogic;
|
|
|
+
|
|
|
+ @GetMapping("/list")
|
|
|
+ @Operation(summary = "标签列表")
|
|
|
+ public ResponseHelper<IPage<CommentTag>> list(
|
|
|
+ @Parameter(description = "页号", required = true) @RequestParam Integer pageNo,
|
|
|
+ @Parameter(description = "页大小", required = true) @RequestParam Integer pageSize,
|
|
|
+ HttpServletRequest request
|
|
|
+ ) {
|
|
|
+ IPage<CommentTag> list = commentTagLogic.list(request,pageNo, pageSize);
|
|
|
+ return ResponseHelper.success(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/add")
|
|
|
+ @Operation(summary ="新增标签")
|
|
|
+ public ResponseHelper remark(
|
|
|
+ @Parameter(description = "标签名称", required = true) @RequestParam String tag,
|
|
|
+ HttpServletRequest request
|
|
|
+ ) {
|
|
|
+ commentTagLogic.add(tag,request);
|
|
|
+ return ResponseHelper.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/update")
|
|
|
+ @Operation(summary ="修改标签")
|
|
|
+ public ResponseHelper update(
|
|
|
+ @Parameter(description = "标签id", required = true) @RequestParam String commentTagId,
|
|
|
+ @Parameter(description = "标签名称", required = true) @RequestParam String tag
|
|
|
+ ) {
|
|
|
+ commentTagLogic.update(commentTagId,tag);
|
|
|
+ return ResponseHelper.success();
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/delete")
|
|
|
+ @Operation(summary ="删除标签")
|
|
|
+ public ResponseHelper delete(
|
|
|
+ @Parameter(description = "标签id", required = true) @RequestParam String commentTagId
|
|
|
+ ) {
|
|
|
+ commentTagLogic.delete(commentTagId);
|
|
|
+ return ResponseHelper.success();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|