|
@@ -0,0 +1,54 @@
|
|
|
|
+package com.gree.mall.contest.controller.pc.tag;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+import com.gree.mall.contest.helper.ResponseHelper;
|
|
|
|
+import com.gree.mall.contest.logic.tag.TagLogic;
|
|
|
|
+import com.gree.mall.contest.plus.entity.Tag;
|
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
|
+import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
+
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
+
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
+
|
|
|
|
+@Slf4j
|
|
|
|
+@RestController
|
|
|
|
+@io.swagger.v3.oas.annotations.tags.Tag(name = "标签管理", description ="标签管理" )
|
|
|
|
+@RequestMapping(value = "pc/tag", produces = "application/json; charset=utf-8")
|
|
|
|
+public class TagController {
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ TagLogic tagLogic;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @GetMapping("/list")
|
|
|
|
+ @Schema(description ="微信标签列表")
|
|
|
|
+ public ResponseHelper<IPage<Tag>> list(
|
|
|
|
+ HttpServletRequest request,
|
|
|
|
+ @Parameter(description = "页号",required = true) @RequestParam Integer pageNum,
|
|
|
|
+ @Parameter(description = "页大小",required = true) @RequestParam Integer pageSize
|
|
|
|
+ ){
|
|
|
|
+ IPage<Tag> list = tagLogic.list(request, pageNum, pageSize);
|
|
|
|
+ return ResponseHelper.success(list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @GetMapping("/sync")
|
|
|
|
+ @Schema(description ="同步最新的企业微信标签")
|
|
|
|
+ public ResponseHelper sync(HttpServletRequest request) throws WxErrorException {
|
|
|
|
+ tagLogic.sync(request);
|
|
|
|
+ return ResponseHelper.success();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|