| | |
| | | import com.ruoyi.system.domain.dto.*; |
| | | 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; |
| | |
| | | private SysClassificationService sysClassificationService; |
| | | |
| | | @Resource |
| | | private ISysOperLogService operLogService; |
| | | |
| | | @Resource |
| | | private SysTagService sysTagService; |
| | | |
| | | @Resource |
| | | private ArticleService articleService; |
| | | |
| | | @Resource |
| | | private RegionService regionService; |
| | | |
| | | |
| | | @RequestMapping(value = "/getCustomConfig", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取单个配置") |
| | | public R<MgtCustomConfigVo> getCustomConfig(@RequestBody MgtCustomConfigDto mgtCustomConfigDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtCustomConfigDto.setUserId(userId); |
| | | MgtCustomConfigVo mgtCustomConfigVo = customConfigService.getCustomConfig(mgtCustomConfigDto); |
| | | return R.ok(mgtCustomConfigVo); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editCooperation", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改申请合作") |
| | |
| | | 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 = "/getAllCustomConfig", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取全部自定义设置") |
| | | public R<MgtAllCustomConfigVo> getAllCustomConfig() { |
| | | MgtAllCustomConfigVo mgtAllCustomConfigVo = customConfigService.getAllCustomConfig(); |
| | | return R.ok(mgtAllCustomConfigVo); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editOtherConfig", method = RequestMethod.POST) |
| | |
| | | @ApiOperation(value = "修改合作商配置") |
| | | public R editShopConfig(@RequestBody MgtShopConfigEditDto mgtShopConfigEditDto) { |
| | | customConfigService.editShopConfig(mgtShopConfigEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editMemberConfig", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改合作商配置") |
| | | public R editMemberConfig(@RequestBody MgtMemberConfigEditDto mgtMemberConfigEditDto) { |
| | | customConfigService.editMemberConfig(mgtMemberConfigEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/editTag", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改分类") |
| | | @ApiOperation(value = "修改标签") |
| | | public R editTag(@RequestBody MgtTagEditDto mgtTagEditDto) { |
| | | mgtTagEditDto.setUserId(SecurityUtils.getUserId()); |
| | | sysTagService.editTag(mgtTagEditDto); |
| | |
| | | sysTagService.deleteTag(Long.valueOf(mgtBaseGetDto.getId())); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageArticle", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取文章列表") |
| | | public R<Page<MgtArticlePageVo>> pageArticle(@RequestBody MgtArticlePageDto mgtArticlePageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtArticlePageDto.setUserId(userId); |
| | | Page<MgtArticlePageVo> page = new Page<>(); |
| | | page.setSize(mgtArticlePageDto.getPageSize()); |
| | | page.setCurrent(mgtArticlePageDto.getPageNum()); |
| | | List<MgtArticlePageVo> mgtArticlePageVoList = articleService.pageArticle(page, mgtArticlePageDto); |
| | | return R.ok(page.setRecords(mgtArticlePageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editArticle", method = RequestMethod.POST) |
| | | @ApiOperation(value = "修改文章") |
| | | public R editArticle(@RequestBody MgtArticleEditDto mgtArticleEditDto) { |
| | | mgtArticleEditDto.setUserId(SecurityUtils.getUserId()); |
| | | articleService.editMgtArticle(mgtArticleEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deleteArticle", method = RequestMethod.POST) |
| | | @ApiOperation(value = "删除文章") |
| | | public R deleteArticle(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | mgtBaseGetDto.setUserId(SecurityUtils.getUserId()); |
| | | articleService.deleteArticle(mgtBaseGetDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/listRegion", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取省市区列表") |
| | | public R<List<RegionVo>> listRegion(){ |
| | | List<RegionVo> regionVoList = regionService.listRegionVo(); |
| | | return R.ok(regionVoList); |
| | | } |
| | | |
| | | } |