| | |
| | | package com.ruoyi.system.controller.management; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | 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.system.api.domain.dto.MGtOneClinkSyncingShopPageDTO; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtClassNumDto; |
| | | 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; |
| | |
| | | @Resource |
| | | private RecommendCooperationService recommendCooperationService; |
| | | |
| | | @Resource |
| | | private BottomNavService bottomNavService; |
| | | |
| | | @Resource |
| | | private OneClinkSyncingService oneClinkSyncingService; |
| | | |
| | | |
| | | @RequestMapping(value = "/getCustomConfig", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取单个配置") |
| | |
| | | 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 = "修改协议") |
| | |
| | | |
| | | @RequestMapping(value = "/editBanner", method = RequestMethod.POST) |
| | | @Log(title = "banner管理", businessType = BusinessType.UPDATE,operContent = "修改banner") |
| | | @ApiOperation(value = "修改banner") |
| | | @ApiOperation(value = "修改banner【2.0】") |
| | | public R editBanner(@RequestBody MgtBannerEditDto mgtBannerEditDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtBannerEditDto.setUserId(userId); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/getBanner", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取banner编辑信息") |
| | | @ApiOperation(value = "获取banner编辑信息【2.0】") |
| | | public R<MgtBannerGetVo> getBanner(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtBaseGetDto.setUserId(userId); |
| | |
| | | |
| | | @RequestMapping(value = "/editPop", method = RequestMethod.POST) |
| | | @Log(title = "弹窗管理", businessType = BusinessType.UPDATE,operContent = "修改弹窗广告") |
| | | @ApiOperation(value = "修改弹窗广告") |
| | | @ApiOperation(value = "修改弹窗广告【2.0】") |
| | | public R editPop(@RequestBody MgtPopEditDto mgtPopEditDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtPopEditDto.setUserId(userId); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/getPop", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取弹窗编辑信息") |
| | | @ApiOperation(value = "获取弹窗编辑信息【2.0】") |
| | | public R<MgtPopGetVo> getPop(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtBaseGetDto.setUserId(userId); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getBottomNav", method = RequestMethod.GET) |
| | | @ApiOperation(value = "获取底部导航栏配置数据【2.0】") |
| | | public R<List<BottomNav>> getBottomNav() { |
| | | List<BottomNav> list = bottomNavService.getAllBottomNav(); |
| | | return R.ok(list); |
| | | } |
| | | @RequestMapping(value = "/editBottomNav", method = RequestMethod.PUT) |
| | | @ApiOperation(value = "获取底部导航栏配置数据【2.0】") |
| | | 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) { |
| | |
| | | |
| | | @RequestMapping(value = "/editQuickEntry", method = RequestMethod.POST) |
| | | @Log(title = "快速入口管理", businessType = BusinessType.UPDATE,operContent = "修改快速入口") |
| | | @ApiOperation(value = "修改快速入口") |
| | | @ApiOperation(value = "修改快速入口【2.0】") |
| | | public R editQuickEntry(@RequestBody MgtQuickEntryEditDto mgtQuickEntryEditDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtQuickEntryEditDto.setUserId(userId); |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/getQuickEntry", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取快速入口编辑信息") |
| | | @ApiOperation(value = "获取快速入口编辑信息【2.0】") |
| | | public R<MgtQuickEntryGetVo> getQuickEntry(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtBaseGetDto.setUserId(userId); |
| | |
| | | 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 = "修改合作商配置") |
| | |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtOperLogPageDto.setUserId(userId); |
| | | Page<MgtOperLogPageVo> page = new Page<>(); |
| | | if(page.getSize()>5000){ |
| | | if(mgtOperLogPageDto.getPageSize() > 5000){ |
| | | page.setSize(5000); |
| | | page.setCurrent(1); |
| | | }else{ |
| | | page.setSize(mgtOperLogPageDto.getPageSize()); |
| | | page.setCurrent(mgtOperLogPageDto.getPageNum()); |
| | | } |
| | | List<MgtOperLogPageVo> mgtOperLogPageVoList = customConfigService.pageOperLog(page, mgtOperLogPageDto); |
| | | ExcelUtil<MgtOperLogPageVo> util = new ExcelUtil<MgtOperLogPageVo>(MgtOperLogPageVo.class); |
| | |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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 = "分页获取推荐分配列表") |
| | |
| | | return R.ok(bulletinBoard); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageOneClinkSyncing", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取一键同步【2.0】") |
| | | public R<IPage<MgtOneClinkSyncPageVO>> pageOneClinkSyncing(@RequestBody MgtOneClinkSyncingPageDTO mgtPageDto) { |
| | | return R.ok(oneClinkSyncingService.pageOneClinkSyncing(mgtPageDto)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editOneClinkSyncing", method = RequestMethod.POST) |
| | | @Log(title = "一键同步管理", businessType = BusinessType.UPDATE,operContent = "修改一键同步") |
| | | @ApiOperation(value = "修改一键同步【2.0】") |
| | | public R editOneClinkSyncing(@RequestBody MgtOneClinkSyncingEditDto dto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | dto.setUserId(userId); |
| | | return oneClinkSyncingService.editOneClinkSyncing(dto); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getOneClinkSyncing", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取一键同步信息(查看详情)【2.0】") |
| | | public R<MgtOneClinkSyncingVO> getOneClinkSyncing(@RequestBody MGtOneClinkSyncingShopPageDTO dto ) { |
| | | return oneClinkSyncingService.getOneClinkSyncing(dto); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deleteOneClinkSyncing", method = RequestMethod.GET) |
| | | @Log(title = "一键同步管理", businessType = BusinessType.DELETE,operContent = "删除一键同步") |
| | | @ApiOperation(value = "删除一键同步【2.0】") |
| | | public R deleteOneClinkSyncing(@RequestParam("syncingId") Integer syncingId ) { |
| | | return oneClinkSyncingService.deleteOneClinkSyncing(syncingId); |
| | | } |
| | | |
| | | @RequestMapping(value = "/executeOneClinkSyncing", method = RequestMethod.GET) |
| | | @Log(title = "一键同步管理", businessType = BusinessType.UPDATE,operContent = "执行一键同步") |
| | | @ApiOperation(value = "执行一键同步【2.0】") |
| | | public R executeOneClinkSyncing(@RequestParam("syncingId") Integer syncingId ) { |
| | | return oneClinkSyncingService.executeOneClinkSyncing(syncingId); |
| | | } |
| | | |
| | | } |