jiangqs
2023-06-12 924242a73d62d247f7055ffd0dd86a2700757f5b
ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/controller/management/MgtShopController.java
@@ -5,10 +5,7 @@
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.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.shop.service.shop.*;
import com.ruoyi.system.api.domain.dto.MgtBaseGetDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -44,6 +41,16 @@
    @Resource
    private ShopSuggestService shopSuggestService;
    @Resource
    private ShopCertificateService shopCertificateService;
    @RequestMapping(value = "/listMgtShopSimpleVo", method = RequestMethod.POST)
    @ApiOperation(value = "分页获取商户列表")
    public R<List<MgtShopListSimpleVo>> listMgtShopSimpleVo(@RequestBody MgtShopListDto mgtShopListDto) {
        List<MgtShopListSimpleVo> mgtShopListSimpleVoList = shopService.listMgtShopSimpleVo(mgtShopListDto);
        return R.ok(mgtShopListSimpleVoList);
    }
    @RequestMapping(value = "/pageMgtShop", method = RequestMethod.POST)
    @ApiOperation(value = "分页获取商户列表")
    public R<Page<MgtShopPageVo>> pageMgtShop(@RequestBody MgtShopPageDto mgtShopPageDto) {
@@ -73,7 +80,7 @@
    @RequestMapping(value = "/getMgtShopTag", method = RequestMethod.POST)
    @ApiOperation(value = "获取商户标签")
    public R<List<MgtShopTagVo>> getMgtShopTag(@RequestBody MgtBaseGetDto mgtBaseGetDto) {
        List<MgtShopTagVo> mgtShopInfoVoList = shopRelTagService.listShopTagVo(Long.valueOf(mgtBaseGetDto.getId()));
        List<MgtShopTagVo> mgtShopInfoVoList = shopRelTagService.listShopTagVo(mgtBaseGetDto);
        return R.ok(mgtShopInfoVoList);
    }
@@ -147,4 +154,25 @@
        shopSuggestService.mgtEditShopSuggestTag(mgtTagShopSuggestDto);
        return R.ok();
    }
    @RequestMapping(value = "/pageMgtShopCertificate", method = RequestMethod.POST)
    @ApiOperation(value = "平台获取商户证书审核列表")
    public R<Page<MgtShopCertificatePageVo>> pageMgtShopCertificate(@RequestBody MgtShopCertificatePageDto mgtShopCertificatePageDto) {
        Long userId = SecurityUtils.getUserId();
        mgtShopCertificatePageDto.setUserId(userId);
        Page<MgtShopCertificatePageVo> page = new Page<>();
        page.setSize(mgtShopCertificatePageDto.getPageSize());
        page.setCurrent(mgtShopCertificatePageDto.getPageNum());
        List<MgtShopCertificatePageVo> mgtShopCertificatePageVoList = shopCertificateService.pageMgtShopCertificate(page,mgtShopCertificatePageDto);
        return R.ok(page.setRecords(mgtShopCertificatePageVoList));
    }
    @RequestMapping(value = "/mgtAuditShopCertificate", method = RequestMethod.POST)
    @ApiOperation(value = "平台编辑会员建议标签")
    public R mgtAuditShopCertificate(@RequestBody MgtAuditShopCertificateDto mgtAuditShopCertificateDto) {
        Long userId = SecurityUtils.getUserId();
        mgtAuditShopCertificateDto.setUserId(userId);
        shopCertificateService.mgtAuditShopCertificate(mgtAuditShopCertificateDto);
        return R.ok();
    }
}