From 1789718f58e3374ce85357524ef80a84f3d70d6f Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期日, 25 六月 2023 18:36:01 +0800 Subject: [PATCH] 商户端统计 --- ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/management/MgtShopController.java | 46 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 44 insertions(+), 2 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 2ec080a..71fb7b2 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 @@ -2,6 +2,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.core.utils.poi.ExcelUtil; import com.ruoyi.common.security.utils.SecurityUtils; import com.ruoyi.shop.domain.dto.*; import com.ruoyi.shop.domain.vo.*; @@ -16,6 +17,7 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; import java.util.List; /** @@ -46,7 +48,7 @@ private ShopCertificateService shopCertificateService; @RequestMapping(value = "/listMgtShopSimpleVo", method = RequestMethod.POST) - @ApiOperation(value = "分页获取商户列表") + @ApiOperation(value = "获取简易商户列表") public R<List<MgtShopListSimpleVo>> listMgtShopSimpleVo(@RequestBody MgtShopListDto mgtShopListDto) { List<MgtShopListSimpleVo> mgtShopListSimpleVoList = shopService.listMgtShopSimpleVo(mgtShopListDto); return R.ok(mgtShopListSimpleVoList); @@ -60,6 +62,17 @@ page.setCurrent(mgtShopPageDto.getPageNum()); List<MgtShopPageVo> mgtShopPageVoList = shopService.pageMgtShop(page,mgtShopPageDto); return R.ok(page.setRecords(mgtShopPageVoList)); + } + + @RequestMapping(value = "/exportPageMgtShop", method = RequestMethod.POST) + @ApiOperation(value = "导出商户列表") + public void exportPageMgtShop(@RequestBody MgtShopPageDto mgtShopPageDto, HttpServletResponse response) { + Page<MgtShopPageVo> page = new Page<>(); + page.setSize(2000); + page.setCurrent(1); + List<MgtShopPageVo> mgtShopPageVoList = shopService.pageMgtShop(page,mgtShopPageDto); + ExcelUtil<MgtShopPageVo> util = new ExcelUtil<MgtShopPageVo>(MgtShopPageVo.class); + util.exportExcel(response, mgtShopPageVoList, "用户订单列表"); } @RequestMapping(value = "/createMgtShop", method = RequestMethod.POST) @@ -89,6 +102,15 @@ @ApiOperation(value = "修改商户标签") public R editMgtShopTag(@RequestBody MgtEditShopTagDto mgtEditShopTagDto) { shopService.editShopTag(mgtEditShopTagDto); + return R.ok(); + } + + @RequestMapping(value = "/terminateMgtCooperation", method = RequestMethod.POST) + @ApiOperation(value = "终止合作") + public R terminateMgtCooperation(@RequestBody MgtTerminateCooperationDto mgtTerminateCooperationDto) { + Long userId = SecurityUtils.getUserId(); + mgtTerminateCooperationDto.setUserId(userId); + shopService.terminateMgtCooperation(mgtTerminateCooperationDto); return R.ok(); } @@ -131,8 +153,21 @@ return R.ok(page.setRecords(mgtShopSuggestPageVoList)); } + @RequestMapping(value = "/exportPageMgtShopSuggest", method = RequestMethod.POST) + @ApiOperation(value = "导出商户建议列表") + public void exportPageMgtShopSuggest(@RequestBody MgtShopSuggestPageDto mgtShopSuggestPageDto, HttpServletResponse response) { + Long userId = SecurityUtils.getUserId(); + mgtShopSuggestPageDto.setUserId(userId); + Page<MgtShopSuggestPageVo> page = new Page<>(); + page.setSize(2000); + page.setCurrent(1); + List<MgtShopSuggestPageVo> mgtShopSuggestPageVoList = shopSuggestService.pageMgtShopSuggest(page,mgtShopSuggestPageDto); + ExcelUtil<MgtShopSuggestPageVo> util = new ExcelUtil<MgtShopSuggestPageVo>(MgtShopSuggestPageVo.class); + util.exportExcel(response, mgtShopSuggestPageVoList, "商户建议列表"); + } + @RequestMapping(value = "/mgtReplayShopSuggest", method = RequestMethod.POST) - @ApiOperation(value = "平台回复会员建议") + @ApiOperation(value = "平台回复建议") public R mgtReplayShopSuggest(@RequestBody MgtReplayShopSuggestDto mgtReplayShopSuggestDto) { Long userId = SecurityUtils.getUserId(); mgtReplayShopSuggestDto.setUserId(userId); @@ -205,4 +240,11 @@ shopService.mgtShopAuth(mgtShopAuthDto); return R.ok(); } + + @RequestMapping(value = "/getMgtShopAuth", method = RequestMethod.POST) + @ApiOperation(value = "获取商户进件信息") + public R<MgtShopAuthGetVo> getMgtShopAuth(@RequestBody MgtShopAuthGetDto mgtShopAuthGetDto) { + MgtShopAuthGetVo shopAuthGetVo = shopService.getMgtShopAuth(mgtShopAuthGetDto.getAuthId()); + return R.ok(shopAuthGetVo); + } } -- Gitblit v1.7.1