From d3abd08d49bd74000d57bd3ba97537f4fc14fa2b Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期三, 10 五月 2023 20:29:51 +0800
Subject: [PATCH] DEMO初步完成

---
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java |   92 ++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 80 insertions(+), 12 deletions(-)

diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
index d7a5533..d10738d 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/business/MerShopController.java
@@ -3,19 +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.MerAgencyPageDto;
-import com.ruoyi.shop.domain.dto.MerMemberTaskPageDto;
-import com.ruoyi.shop.domain.dto.MerShopCertificateEditDto;
-import com.ruoyi.shop.domain.dto.MerShopCertificateListDto;
-import com.ruoyi.shop.domain.vo.MerAgencyPageVo;
-import com.ruoyi.shop.domain.vo.MerMemberTaskPageVo;
-import com.ruoyi.shop.domain.vo.MerShopCertificateListVo;
-import com.ruoyi.shop.domain.vo.MgtShopInfoVo;
-import com.ruoyi.shop.service.shop.ShopCertificateService;
-import com.ruoyi.shop.service.shop.ShopService;
-import com.ruoyi.system.api.domain.dto.MerBaseDto;
-import com.ruoyi.system.api.domain.dto.MgtBaseGetDto;
+import com.ruoyi.shop.domain.dto.*;
+import com.ruoyi.shop.domain.vo.*;
+import com.ruoyi.shop.service.shop.*;
+import com.ruoyi.system.api.domain.dto.*;
 import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo;
+import com.ruoyi.system.api.domain.vo.MerStaffInfoVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -44,6 +37,15 @@
 
     @Autowired
     private ShopCertificateService shopCertificateService;
+
+    @Autowired
+    private ShopStaffService shopStaffService;
+
+    @Autowired
+    private RecommendCooperationService recommendCooperationService;
+
+    @Autowired
+    private ShopSuggestService shopSuggestService;
 
     /**
      * 未完成实际统计
@@ -85,4 +87,70 @@
         shopCertificateService.editShopCertificate(merShopCertificateEditDto);
         return R.ok();
     }
+
+    @RequestMapping(value = "/deleteShopCertificate", method = RequestMethod.POST)
+    @ApiOperation(value = "删除商户证书")
+    public R deleteShopCertificate(@RequestBody MerBaseGetDto merBaseGetDto) {
+        Long userId = SecurityUtils.getUserId();
+        shopCertificateService.deleteShopCertificate(Long.valueOf(merBaseGetDto.getId()));
+        return R.ok();
+    }
+
+    @RequestMapping(value = "/getShopStaffInfo", method = RequestMethod.POST)
+    @ApiOperation(value = "获取员工信息")
+    public R<MerStaffInfoVo> getShopStaffInfo() {
+        Long userId = SecurityUtils.getUserId();
+        MerStaffInfoVo merStaffInfoVo = shopStaffService.getShopStaffInfo(userId);
+        return R.ok(merStaffInfoVo);
+    }
+
+    @RequestMapping(value = "/editShopStaffInfo", method = RequestMethod.POST)
+    @ApiOperation(value = "修改员工信息")
+    public R editShopStaffInfo(@RequestBody MerEditUserDto merEditUserDto) {
+        Long userId = SecurityUtils.getUserId();
+        shopStaffService.editShopStaffInfo(merEditUserDto);
+        return R.ok();
+    }
+
+    @RequestMapping(value = "/pageMerShopRecommend", method = RequestMethod.POST)
+    @ApiOperation(value = "分页获取商户推荐列表")
+    public R<Page<MerShopRecommendPageVo>> pageMerShopRecommend(@RequestBody MerShopRecommendPageDto merShopRecommendPageDto) {
+        Long userId = SecurityUtils.getUserId();
+        merShopRecommendPageDto.setUserId(userId);
+        Page<MerShopRecommendPageVo> page = new Page<>();
+        page.setSize(merShopRecommendPageDto.getPageSize());
+        page.setCurrent(merShopRecommendPageDto.getPageNum());
+        List<MerShopRecommendPageVo> merShopRecommendPageVoList = recommendCooperationService.pageMerShopRecommend(page,merShopRecommendPageDto);
+        return R.ok(page.setRecords(merShopRecommendPageVoList));
+    }
+
+    @RequestMapping(value = "/recommendCooperation", method = RequestMethod.POST)
+    @ApiOperation(value = "推荐合作")
+    public R recommendCooperation(@RequestBody MerRecommendCooperationDto merRecommendCooperationDto) {
+        Long userId = SecurityUtils.getUserId();
+        merRecommendCooperationDto.setUserId(userId);
+        recommendCooperationService.recommendCooperation(merRecommendCooperationDto);
+        return R.ok();
+    }
+
+    @RequestMapping(value = "/pageMerShopSuggest", method = RequestMethod.POST)
+    @ApiOperation(value = "分页获取商户建议")
+    public R<Page<MerShopSuggestVo>> pageMerShopSuggest(@RequestBody MerPageDto merPageDto) {
+        Long userId = SecurityUtils.getUserId();
+        merPageDto.setUserId(userId);
+        Page<MerShopSuggestVo> page = new Page<>();
+        page.setSize(merPageDto.getPageSize());
+        page.setCurrent(merPageDto.getPageNum());
+        List<MerShopSuggestVo> merShopSuggestVoList = shopSuggestService.pageMerShopSuggest(page,merPageDto);
+        return R.ok(page.setRecords(merShopSuggestVoList));
+    }
+
+    @RequestMapping(value = "/suggest", method = RequestMethod.POST)
+    @ApiOperation(value = "建议")
+    public R suggest(@RequestBody MerShopSuggestDto merShopSuggestDto) {
+        Long userId = SecurityUtils.getUserId();
+        merShopSuggestDto.setUserId(userId);
+        shopSuggestService.suggest(merShopSuggestDto);
+        return R.ok();
+    }
 }

--
Gitblit v1.7.1