| | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtPageDto; |
| | | import com.ruoyi.system.domain.dto.*; |
| | | import com.ruoyi.system.domain.vo.MgtBannerGetVo; |
| | | import com.ruoyi.system.domain.vo.MgtBannerPageVo; |
| | | import com.ruoyi.system.domain.vo.MgtPopGetVo; |
| | | import com.ruoyi.system.domain.vo.MgtPopPageVo; |
| | | import com.ruoyi.system.domain.vo.*; |
| | | import com.ruoyi.system.service.config.*; |
| | | import com.ruoyi.system.service.sys.ISysOperLogService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | |
| | | @Resource |
| | | private PopService popService; |
| | | |
| | | @Resource |
| | | private QuickEntryService quickEntryService; |
| | | |
| | | @Resource |
| | | private AdvertService advertService; |
| | | |
| | | @Resource |
| | | private ActivenessService activenessService; |
| | | |
| | | @Resource |
| | | private SysClassificationService sysClassificationService; |
| | | |
| | | @Resource |
| | | private ISysOperLogService operLogService; |
| | | |
| | | @Resource |
| | | private SysTagService sysTagService; |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/editCooperation", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改申请合作") |
| | |
| | | popService.deleteMgtPop(mgtBaseGetDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageQuickEntry", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取快速入口") |
| | | public R<Page<MgtQuickEntryPageVo>> pageQuickEntry(@RequestBody MgtPageDto mgtPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtPageDto.setUserId(userId); |
| | | Page<MgtQuickEntryPageVo> page = new Page<>(); |
| | | page.setSize(mgtPageDto.getPageSize()); |
| | | page.setCurrent(mgtPageDto.getPageNum()); |
| | | List<MgtQuickEntryPageVo> mgtQuickEntryPageVoList = quickEntryService.pageMgtQuickEntry(page); |
| | | return R.ok(page.setRecords(mgtQuickEntryPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editQuickEntry", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改快速入口") |
| | | public R editQuickEntry(@RequestBody MgtQuickEntryEditDto mgtQuickEntryEditDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtQuickEntryEditDto.setUserId(userId); |
| | | quickEntryService.editMgtQuickEntry(mgtQuickEntryEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getQuickEntry", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取快速入口编辑信息") |
| | | public R<MgtQuickEntryGetVo> getQuickEntry(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtBaseGetDto.setUserId(userId); |
| | | MgtQuickEntryGetVo mgtQuickEntryGetVo = quickEntryService.getMgtQuickEntry(Long.valueOf(mgtBaseGetDto.getId())); |
| | | return R.ok(mgtQuickEntryGetVo); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deleteQuickEntry", method = RequestMethod.POST) |
| | | @ApiOperation(value = "删除快速入口") |
| | | public R deleteQuickEntry(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtBaseGetDto.setUserId(userId); |
| | | quickEntryService.deleteMgtQuickEntry(mgtBaseGetDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getCustomConfig", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取自定义设置") |
| | | public R<MgtCustomConfigVo> getCustomConfig() { |
| | | MgtCustomConfigVo mgtCustomConfigVo = customConfigService.getCustomConfig(); |
| | | return R.ok(mgtCustomConfigVo); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editOtherConfig", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改其它设置") |
| | | public R editOtherConfig(@RequestBody MgtOtherConfigEditDto mgtOtherConfigEditDto) { |
| | | customConfigService.editOtherConfig(mgtOtherConfigEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editShopConfig", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改合作商配置") |
| | | public R editShopConfig(@RequestBody MgtShopConfigEditDto mgtShopConfigEditDto) { |
| | | customConfigService.editShopConfig(mgtShopConfigEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editAdvert", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改广告配置") |
| | | public R editAdvert(@RequestBody MgtAdvertEditDto mgtAdvertEditDto) { |
| | | mgtAdvertEditDto.setUserId(SecurityUtils.getUserId()); |
| | | advertService.editMgtAdvert(mgtAdvertEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editActiveness", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改活跃度") |
| | | public R editActiveness(@RequestBody MgtActivenessEditDto mgtActivenessEditDto) { |
| | | mgtActivenessEditDto.setUserId(SecurityUtils.getUserId()); |
| | | activenessService.editMgtActiveness(mgtActivenessEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageClassification", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取分类列表") |
| | | public R<Page<MgtClassificationPageVo>> pageClassification(@RequestBody MgtClassificationPageDto mgtClassificationPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtClassificationPageDto.setUserId(userId); |
| | | Page<MgtClassificationPageVo> page = new Page<>(); |
| | | page.setSize(mgtClassificationPageDto.getPageSize()); |
| | | page.setCurrent(mgtClassificationPageDto.getPageNum()); |
| | | List<MgtClassificationPageVo> mgtClassificationPageVoList = sysClassificationService.pageClassification(page, mgtClassificationPageDto); |
| | | return R.ok(page.setRecords(mgtClassificationPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editClassification", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改分类") |
| | | public R editClassification(@RequestBody MgtClassificationEditDto mgtClassificationEditDto) { |
| | | mgtClassificationEditDto.setUserId(SecurityUtils.getUserId()); |
| | | sysClassificationService.editClassification(mgtClassificationEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deleteClassification", method = RequestMethod.POST) |
| | | @ApiOperation(value = "删除分类") |
| | | public R deleteClassification(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | mgtBaseGetDto.setUserId(SecurityUtils.getUserId()); |
| | | sysClassificationService.deleteClassification(Long.valueOf(mgtBaseGetDto.getId())); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageOperLog", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取操作日志") |
| | | public R<Page<MgtOperLogPageVo>> pageOperLog(@RequestBody MgtOperLogPageDto mgtOperLogPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtOperLogPageDto.setUserId(userId); |
| | | Page<MgtOperLogPageVo> page = new Page<>(); |
| | | page.setSize(mgtOperLogPageDto.getPageSize()); |
| | | page.setCurrent(mgtOperLogPageDto.getPageNum()); |
| | | List<MgtOperLogPageVo> mgtOperLogPageVoList = customConfigService.pageOperLog(page, mgtOperLogPageDto); |
| | | return R.ok(page.setRecords(mgtOperLogPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取标签列表") |
| | | public R<Page<MgtTagPageVo>> pageTag(@RequestBody MgtTagPageDto mgtTagPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtTagPageDto.setUserId(userId); |
| | | Page<MgtTagPageVo> page = new Page<>(); |
| | | page.setSize(mgtTagPageDto.getPageSize()); |
| | | page.setCurrent(mgtTagPageDto.getPageNum()); |
| | | List<MgtTagPageVo> mgtTagPageVoList = sysTagService.pageTag(page, mgtTagPageDto); |
| | | return R.ok(page.setRecords(mgtTagPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改分类") |
| | | public R editTag(@RequestBody MgtTagEditDto mgtTagEditDto) { |
| | | mgtTagEditDto.setUserId(SecurityUtils.getUserId()); |
| | | sysTagService.editTag(mgtTagEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deleteTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "删除标签") |
| | | public R deleteTag(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | mgtBaseGetDto.setUserId(SecurityUtils.getUserId()); |
| | | sysTagService.deleteTag(Long.valueOf(mgtBaseGetDto.getId())); |
| | | return R.ok(); |
| | | } |
| | | } |