From 962e7325d72222a4ffd4d74a1fc5612f95326e98 Mon Sep 17 00:00:00 2001
From: jiangqs <343695869@qq.com>
Date: 星期日, 11 六月 2023 18:49:39 +0800
Subject: [PATCH] 建议管理

---
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/management/MgtShopController.java |   48 +++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 43 insertions(+), 5 deletions(-)

diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/management/MgtShopController.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/management/MgtShopController.java
index 82dec4b..6c405aa 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/management/MgtShopController.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/management/MgtShopController.java
@@ -4,17 +4,18 @@
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.security.utils.SecurityUtils;
 import com.ruoyi.shop.domain.dto.*;
-import com.ruoyi.shop.domain.vo.MgtShopInfoVo;
-import com.ruoyi.shop.domain.vo.MgtShopPageVo;
-import com.ruoyi.shop.domain.vo.MgtShopProportionPageVo;
-import com.ruoyi.shop.domain.vo.MgtShopTagVo;
+import com.ruoyi.shop.domain.vo.*;
 import com.ruoyi.shop.service.shop.ShopProportionService;
 import com.ruoyi.shop.service.shop.ShopRelTagService;
 import com.ruoyi.shop.service.shop.ShopService;
+import com.ruoyi.shop.service.shop.ShopSuggestService;
 import com.ruoyi.system.api.domain.dto.MgtBaseGetDto;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import java.util.List;
@@ -39,6 +40,9 @@
 
     @Resource
     private ShopProportionService shopProportionService;
+
+    @Resource
+    private ShopSuggestService shopSuggestService;
 
     @RequestMapping(value = "/pageMgtShop", method = RequestMethod.POST)
     @ApiOperation(value = "分页获取商户列表")
@@ -107,6 +111,40 @@
         return R.ok();
     }
 
+    @RequestMapping(value = "/pageMgtShopSuggest", method = RequestMethod.POST)
+    @ApiOperation(value = "平台获取商户建议列表")
+    public R<Page<MgtShopSuggestPageVo>> pageMgtShopSuggest(@RequestBody MgtShopSuggestPageDto mgtShopSuggestPageDto) {
+        Long userId = SecurityUtils.getUserId();
+        mgtShopSuggestPageDto.setUserId(userId);
+        Page<MgtShopSuggestPageVo> page = new Page<>();
+        page.setSize(mgtShopSuggestPageDto.getPageSize());
+        page.setCurrent(mgtShopSuggestPageDto.getPageNum());
+        List<MgtShopSuggestPageVo> mgtShopSuggestPageVoList = shopSuggestService.pageMgtShopSuggest(page,mgtShopSuggestPageDto);
+        return R.ok(page.setRecords(mgtShopSuggestPageVoList));
+    }
 
+    @RequestMapping(value = "/mgtReplayShopSuggest", method = RequestMethod.POST)
+    @ApiOperation(value = "平台回复会员建议")
+    public R mgtReplayShopSuggest(@RequestBody MgtReplayShopSuggestDto mgtReplayShopSuggestDto) {
+        Long userId = SecurityUtils.getUserId();
+        mgtReplayShopSuggestDto.setUserId(userId);
+        shopSuggestService.mgtReplayShopSuggest(mgtReplayShopSuggestDto);
+        return R.ok();
+    }
 
+    @RequestMapping(value = "/listMgtShopSuggestTag", method = RequestMethod.POST)
+    @ApiOperation(value = "获取商户建议标签")
+    public R<List<MgtShopSuggestTagVo>> listMgtShopSuggestTag(@RequestBody MgtBaseGetDto mgtBaseGetDto) {
+        List<MgtShopSuggestTagVo> mgtShopSuggestTagVoList = shopSuggestService.listMgtShopSuggestTag(Long.valueOf(mgtBaseGetDto.getId()));
+        return R.ok(mgtShopSuggestTagVoList);
+    }
+
+    @RequestMapping(value = "/mgtEditShopSuggestTag", method = RequestMethod.POST)
+    @ApiOperation(value = "平台编辑会员建议标签")
+    public R mgtEditShopSuggestTag(@RequestBody MgtTagShopSuggestDto mgtTagShopSuggestDto) {
+        Long userId = SecurityUtils.getUserId();
+        mgtTagShopSuggestDto.setUserId(userId);
+        shopSuggestService.mgtEditShopSuggestTag(mgtTagShopSuggestDto);
+        return R.ok();
+    }
 }

--
Gitblit v1.7.1