From 257ce232897d0e4a232e827ba61516b747389078 Mon Sep 17 00:00:00 2001
From: zhanglin <852614290@qq.com>
Date: 星期日, 23 七月 2023 16:04:35 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/HongRuiTang
---
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/management/MgtShopController.java | 121 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 116 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 ac3dc58..dcc54e9 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,19 +2,25 @@
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.log.annotation.Log;
+import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.security.utils.SecurityUtils;
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.MgtBaseGetDto;
+import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
+import org.springframework.validation.annotation.Validated;
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 javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -45,7 +51,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);
@@ -61,9 +67,21 @@
return R.ok(page.setRecords(mgtShopPageVoList));
}
+ @RequestMapping(value = "/exportPageMgtShop", method = RequestMethod.POST)
+ @ApiOperation(value = "导出商户列表")
+ public void exportPageMgtShop(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)
+ @Log(title = "商户管理", businessType = BusinessType.UPDATE,operContent = "编辑商户")
@ApiOperation(value = "平台编辑商户")
- public R createMgtShop(@RequestBody MgtEditShopDto mgtEditShopDto) {
+ public R createMgtShop(@Validated @RequestBody MgtEditShopDto mgtEditShopDto) {
Long userId = SecurityUtils.getUserId();
mgtEditShopDto.setUserId(userId);
shopService.createShop(mgtEditShopDto);
@@ -85,13 +103,43 @@
}
@RequestMapping(value = "/editMgtShopTag", method = RequestMethod.POST)
+ @Log(title = "商户管理", businessType = BusinessType.UPDATE,operContent = "修改商户标签")
@ApiOperation(value = "修改商户标签")
public R editMgtShopTag(@RequestBody MgtEditShopTagDto mgtEditShopTagDto) {
shopService.editShopTag(mgtEditShopTagDto);
return R.ok();
}
+ @RequestMapping(value = "/transferMgtShop", method = RequestMethod.POST)
+ @Log(title = "商户管理", businessType = BusinessType.UPDATE,operContent = "转移客户")
+ @ApiOperation(value = "转移客户")
+ public R transferMgtShop(@RequestBody MgtTransferShopDto mgtTransferShopDto) {
+ shopService.transferMgtShop(mgtTransferShopDto);
+ return R.ok();
+ }
+
+ @RequestMapping(value = "/terminateMgtCooperation", method = RequestMethod.POST)
+ @Log(title = "商户管理", businessType = BusinessType.UPDATE,operContent = "终止合作")
+ @ApiOperation(value = "终止合作")
+ public R terminateMgtCooperation(@RequestBody MgtTerminateCooperationDto mgtTerminateCooperationDto) {
+ Long userId = SecurityUtils.getUserId();
+ mgtTerminateCooperationDto.setUserId(userId);
+ shopService.terminateMgtCooperation(mgtTerminateCooperationDto);
+ return R.ok();
+ }
+
+ @RequestMapping(value = "/frozenMgtShop", method = RequestMethod.POST)
+ @Log(title = "商户管理", businessType = BusinessType.UPDATE,operContent = "终止合作")
+ @ApiOperation(value = "冻结商户")
+ public R frozenMgtShop(@RequestBody MgtFrozenShopDto mgtFrozenShopDto) {
+ Long userId = SecurityUtils.getUserId();
+ mgtFrozenShopDto.setUserId(userId);
+ shopService.frozenMgtShop(mgtFrozenShopDto);
+ return R.ok();
+ }
+
@RequestMapping(value = "/changeMgtCooperationTime", method = RequestMethod.POST)
+ @Log(title = "商户管理", businessType = BusinessType.UPDATE,operContent = "修改合作时间")
@ApiOperation(value = "修改合作时间")
public R changeMgtCooperationTime(@RequestBody MgtChangeCoopDto mgtChangeCoopDto) {
Long userId = SecurityUtils.getUserId();
@@ -111,6 +159,7 @@
}
@RequestMapping(value = "/editMgtShopProportion", method = RequestMethod.POST)
+ @Log(title = "商户管理", businessType = BusinessType.UPDATE,operContent = "修改商户分成")
@ApiOperation(value = "修改商户分成")
public R editMgtShopProportion(@RequestBody MgtShopProportionEditDto mgtShopProportionEditDto) {
mgtShopProportionEditDto.setUserId(SecurityUtils.getUserId());
@@ -130,8 +179,22 @@
return R.ok(page.setRecords(mgtShopSuggestPageVoList));
}
+ @RequestMapping(value = "/exportPageMgtShopSuggest", method = RequestMethod.POST)
+ @ApiOperation(value = "导出商户建议列表")
+ public void exportPageMgtShopSuggest(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 = "平台回复会员建议")
+ @Log(title = "商户建议管理", businessType = BusinessType.UPDATE,operContent = "回复商户建议")
+ @ApiOperation(value = "平台回复建议")
public R mgtReplayShopSuggest(@RequestBody MgtReplayShopSuggestDto mgtReplayShopSuggestDto) {
Long userId = SecurityUtils.getUserId();
mgtReplayShopSuggestDto.setUserId(userId);
@@ -147,7 +210,8 @@
}
@RequestMapping(value = "/mgtEditShopSuggestTag", method = RequestMethod.POST)
- @ApiOperation(value = "平台编辑会员建议标签")
+ @Log(title = "商户建议管理", businessType = BusinessType.UPDATE,operContent = "编辑商户建议标签")
+ @ApiOperation(value = "平台编辑商户建议标签")
public R mgtEditShopSuggestTag(@RequestBody MgtTagShopSuggestDto mgtTagShopSuggestDto) {
Long userId = SecurityUtils.getUserId();
mgtTagShopSuggestDto.setUserId(userId);
@@ -168,11 +232,58 @@
}
@RequestMapping(value = "/mgtAuditShopCertificate", method = RequestMethod.POST)
- @ApiOperation(value = "平台编辑会员建议标签")
+ @Log(title = "商户证书管理", businessType = BusinessType.UPDATE,operContent = "审核商户证书")
+ @ApiOperation(value = "平台审核商户证书")
public R mgtAuditShopCertificate(@RequestBody MgtAuditShopCertificateDto mgtAuditShopCertificateDto) {
Long userId = SecurityUtils.getUserId();
mgtAuditShopCertificateDto.setUserId(userId);
shopCertificateService.mgtAuditShopCertificate(mgtAuditShopCertificateDto);
return R.ok();
}
+
+ @RequestMapping(value = "/pageMgtShopByCityCode", method = RequestMethod.POST)
+ @ApiOperation(value = "通过市code分页获取商户列表")
+ public R<Page<MgtSimpleShopVo>> pageMgtShopByCityCode(@RequestBody MgtShopByCodePageDto mgtShopByCodePageDto) {
+ Page<MgtSimpleShopVo> page = new Page<>();
+ page.setSize(mgtShopByCodePageDto.getPageSize());
+ page.setCurrent(mgtShopByCodePageDto.getPageNum());
+ List<MgtSimpleShopVo> mgtSimpleShopVoList = shopService.pageMgtShopByCityCode(page,mgtShopByCodePageDto);
+ return R.ok(page.setRecords(mgtSimpleShopVoList));
+ }
+
+ @RequestMapping(value = "/pageMgtShopAuth", method = RequestMethod.POST)
+ @ApiOperation(value = "分页获取商户进件列表")
+ public R<Page<MgtShopAuthPageVo>> pageMgtShopAuth(@RequestBody MgtShopAuthPageDto mgtShopAuthPageDto) {
+ Page<MgtShopAuthPageVo> page = new Page<>();
+ page.setSize(mgtShopAuthPageDto.getPageSize());
+ page.setCurrent(mgtShopAuthPageDto.getPageNum());
+ List<MgtShopAuthPageVo> mgtShopAuthPageVoList = shopService.pageMgtShopAuth(page,mgtShopAuthPageDto);
+ return R.ok(page.setRecords(mgtShopAuthPageVoList));
+ }
+
+ @RequestMapping(value = "/mgtShopAuth", method = RequestMethod.POST)
+ @Log(title = "商户进件管理", businessType = BusinessType.UPDATE,operContent = "商户进件")
+ @ApiOperation(value = "平台商户进件")
+ public R mgtShopAuth(@Validated @RequestBody MgtShopAuthDto mgtShopAuthDto) {
+ Long userId = SecurityUtils.getUserId();
+ mgtShopAuthDto.setUserId(userId);
+ 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);
+ }
+
+ @RequestMapping(value = "/getMgtShopAuthCode", method = RequestMethod.POST)
+ @ApiOperation(value = "获取商户进件验证信息")
+ public R<MgtShopAuthCodeVo> getMgtShopAuthCode(@RequestBody MgtShopAuthGetDto mgtShopAuthGetDto) {
+ MgtShopAuthCodeVo mgtShopAuthCodeVo = shopService.getMgtShopAuthCode(mgtShopAuthGetDto.getAuthId());
+ return R.ok(mgtShopAuthCodeVo);
+ }
+
+
}
--
Gitblit v1.7.1