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 |   72 ++++++++++++++++++++++++++++++++---
 1 files changed, 65 insertions(+), 7 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 fd2ae2b..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
@@ -3,15 +3,12 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.security.utils.SecurityUtils;
-import com.ruoyi.shop.domain.dto.MgtChangeCoopDto;
-import com.ruoyi.shop.domain.dto.MgtEditShopDto;
-import com.ruoyi.shop.domain.dto.MgtEditShopTagDto;
-import com.ruoyi.shop.domain.dto.MgtShopPageDto;
-import com.ruoyi.shop.domain.vo.MgtShopInfoVo;
-import com.ruoyi.shop.domain.vo.MgtShopPageVo;
-import com.ruoyi.shop.domain.vo.MgtShopTagVo;
+import com.ruoyi.shop.domain.dto.*;
+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;
@@ -40,6 +37,12 @@
 
     @Resource
     private ShopRelTagService shopRelTagService;
+
+    @Resource
+    private ShopProportionService shopProportionService;
+
+    @Resource
+    private ShopSuggestService shopSuggestService;
 
     @RequestMapping(value = "/pageMgtShop", method = RequestMethod.POST)
     @ApiOperation(value = "分页获取商户列表")
@@ -89,4 +92,59 @@
         shopService.changeCooperationTime(mgtChangeCoopDto);
         return R.ok();
     }
+
+    @RequestMapping(value = "/pageMgtShopProportion", method = RequestMethod.POST)
+    @ApiOperation(value = "分页获取商户分成列表")
+    public R<Page<MgtShopProportionPageVo>> pageMgtShopProportion(@RequestBody MgtShopProportionPageDto mgtShopProportionPageDto) {
+        Page<MgtShopProportionPageVo> page = new Page<>();
+        page.setSize(mgtShopProportionPageDto.getPageSize());
+        page.setCurrent(mgtShopProportionPageDto.getPageNum());
+        List<MgtShopProportionPageVo> mgtShopProportionPageVoList = shopService.pageMgtShopProportion(page,mgtShopProportionPageDto);
+        return R.ok(page.setRecords(mgtShopProportionPageVoList));
+    }
+
+    @RequestMapping(value = "/editMgtShopProportion", method = RequestMethod.POST)
+    @ApiOperation(value = "修改商户分成")
+    public R editMgtShopProportion(@RequestBody MgtShopProportionEditDto mgtShopProportionEditDto) {
+        mgtShopProportionEditDto.setUserId(SecurityUtils.getUserId());
+        shopProportionService.editMgtShopProportion(mgtShopProportionEditDto);
+        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