From 22b2f11edc2f4ee164ba5482bd193c7fb99c0f4f Mon Sep 17 00:00:00 2001 From: huliguo <2023611923@qq.com> Date: 星期五, 13 六月 2025 21:21:26 +0800 Subject: [PATCH] 商品管理、基础设置、经销商加盟商 --- ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java | 86 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 82 insertions(+), 4 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java index 0e3fce0..17efee6 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/management/MgtConfigController.java @@ -12,6 +12,7 @@ import com.ruoyi.system.api.domain.dto.MgtPageDto; import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo; import com.ruoyi.system.domain.dto.*; +import com.ruoyi.system.domain.pojo.config.BottomNav; import com.ruoyi.system.domain.vo.*; import com.ruoyi.system.service.config.*; import io.swagger.annotations.Api; @@ -78,6 +79,9 @@ @Resource private RecommendCooperationService recommendCooperationService; + @Resource + private BottomNavService bottomNavService; + @RequestMapping(value = "/getCustomConfig", method = RequestMethod.POST) @ApiOperation(value = "获取单个配置") @@ -130,6 +134,16 @@ Long userId = SecurityUtils.getUserId(); mgtServiceCodeEditDto.setUserId(userId); customConfigService.editServiceCode(mgtServiceCodeEditDto); + 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(); } @@ -225,6 +239,18 @@ return R.ok(); } + @RequestMapping(value = "/getBottomNav", method = RequestMethod.GET) + @ApiOperation(value = "获取底部导航栏配置数据") + public R<List<BottomNav>> getBottomNav() { + List<BottomNav> list = bottomNavService.getAllBottomNav(); + return R.ok(list); + } + @RequestMapping(value = "/editBottomNav", method = RequestMethod.PUT) + @ApiOperation(value = "获取底部导航栏配置数据") + public R<Void> editBottomNav(@RequestBody BottomNavDto bottomNavDto) { + return bottomNavService.editBottomNav(bottomNavDto); + } + @RequestMapping(value = "/pageQuickEntry", method = RequestMethod.POST) @ApiOperation(value = "分页获取快速入口") public R<Page<MgtQuickEntryPageVo>> pageQuickEntry(@RequestBody MgtPageDto mgtPageDto) { @@ -280,6 +306,16 @@ customConfigService.editOtherConfig(mgtOtherConfigEditDto); return R.ok(); } + + + @RequestMapping(value = "/editStoreCurriculum", method = RequestMethod.POST) + @Log(title = "其它设置管理", businessType = BusinessType.UPDATE,operContent = "修改门店课程设置") + @ApiOperation(value = "修改门店课程设置") + public R editStoreCurriculum(@Validated @RequestBody MgtStoreCurriculumEditDto mgtStoreCurriculumEditDto) { + customConfigService.editStoreCurriculum(mgtStoreCurriculumEditDto); + return R.ok(); + } + @RequestMapping(value = "/editShopConfig", method = RequestMethod.POST) @Log(title = "其它设置管理", businessType = BusinessType.UPDATE,operContent = "修改合作商配置") @@ -411,14 +447,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 +592,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 = "分页获取推荐分配列表") -- Gitblit v1.7.1