mitao
2025-01-17 afa0dbb4f54e7244835dd67ec33c3e545f122f71
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java
@@ -133,6 +133,16 @@
        return R.ok();
    }
    @RequestMapping(value = "/editShopProportion", method = RequestMethod.POST)
    @Log(title = "商户分成管理", businessType = BusinessType.UPDATE,operContent = "修改商户分成")
    @ApiOperation(value = "修改商户分成")
    public R editShopProportion(@RequestBody MgtShopCommonProportionEditDto mgtShopCommonProportionEditDto) {
        Long userId = SecurityUtils.getUserId();
        mgtShopCommonProportionEditDto.setUserId(userId);
        customConfigService.editShopProportion(mgtShopCommonProportionEditDto);
        return R.ok();
    }
    @RequestMapping(value = "/editAgreement", method = RequestMethod.POST)
    @Log(title = "协议管理", businessType = BusinessType.UPDATE,operContent = "修改协议")
    @ApiOperation(value = "修改协议")
@@ -411,14 +421,47 @@
        return R.ok(page.setRecords(mgtTagPageVoList));
    }
    @ApiOperation(value = "导入标签")
    @PostMapping("/importData")
    public AjaxResult importData(MultipartFile file, Integer tagType) throws Exception
    @ApiOperation(value = "导入商品标签")
    @PostMapping("/importGoodsTagData")
    public AjaxResult importGoodsTagData(@RequestPart("file")MultipartFile file) throws Exception
    {
        ExcelUtil<MgtTagImportDto> util = new ExcelUtil<MgtTagImportDto>(MgtTagImportDto.class);
        List<MgtTagImportDto> tagList = util.importExcel(file.getInputStream());
        String operName = SecurityUtils.getUsername();
        String message = sysTagService.importTag(tagList, tagType, operName);
        String message = sysTagService.importTag(tagList, 1, operName);
        return success(message);
    }
    @ApiOperation(value = "导入用户标签")
    @PostMapping("/importUserTagData")
    public AjaxResult importUserTagData(@RequestPart("file")MultipartFile file) throws Exception
    {
        ExcelUtil<MgtTagImportDto> util = new ExcelUtil<MgtTagImportDto>(MgtTagImportDto.class);
        List<MgtTagImportDto> tagList = util.importExcel(file.getInputStream());
        String operName = SecurityUtils.getUsername();
        String message = sysTagService.importTag(tagList, 2, operName);
        return success(message);
    }
    @ApiOperation(value = "导入商户标签")
    @PostMapping("/importShopTagData")
    public AjaxResult importShopTagData(@RequestPart("file")MultipartFile file) throws Exception
    {
        ExcelUtil<MgtTagImportDto> util = new ExcelUtil<MgtTagImportDto>(MgtTagImportDto.class);
        List<MgtTagImportDto> tagList = util.importExcel(file.getInputStream());
        String operName = SecurityUtils.getUsername();
        String message = sysTagService.importTag(tagList, 3, operName);
        return success(message);
    }
    @ApiOperation(value = "导入建议标签")
    @PostMapping("/importSuggestTagData")
    public AjaxResult importSuggestTagData(@RequestPart("file")MultipartFile file) throws Exception
    {
        ExcelUtil<MgtTagImportDto> util = new ExcelUtil<MgtTagImportDto>(MgtTagImportDto.class);
        List<MgtTagImportDto> tagList = util.importExcel(file.getInputStream());
        String operName = SecurityUtils.getUsername();
        String message = sysTagService.importTag(tagList, 4, operName);
        return success(message);
    }
@@ -523,6 +566,15 @@
        List<RegionVo> regionVoList = regionService.listCityVo();
        return R.ok(regionVoList);
    }
    @RequestMapping(value = "/listRegions", method = RequestMethod.GET)
    @ApiOperation(value = "获取省市区列表")
    public R<List<RegionVo>> listRegions(Long pid){
        List<RegionVo> regionVoList = regionService.listRegions(pid);
        return R.ok(regionVoList);
    }
    @RequestMapping(value = "/pageAllotRecommend", method = RequestMethod.POST)
    @ApiOperation(value = "分页获取推荐分配列表")