| | |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | 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.vo.*; |
| | | import com.ruoyi.system.service.config.*; |
| | |
| | | |
| | | @Resource |
| | | private ArticleService articleService; |
| | | |
| | | @Resource |
| | | private RegionService regionService; |
| | | |
| | | @Resource |
| | | private RecommendCooperationService recommendCooperationService; |
| | | |
| | | |
| | | @RequestMapping(value = "/getCustomConfig", method = RequestMethod.POST) |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/deleteActiveness", method = RequestMethod.POST) |
| | | @ApiOperation(value = "删除活跃度") |
| | | public R deleteMgtActiveness(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | mgtBaseGetDto.setUserId(SecurityUtils.getUserId()); |
| | | activenessService.deleteMgtActiveness(mgtBaseGetDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageClassification", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取分类列表") |
| | | public R<Page<MgtClassificationPageVo>> pageClassification(@RequestBody MgtClassificationPageDto mgtClassificationPageDto) { |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageArticle", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取标签列表") |
| | | @ApiOperation(value = "分页获取文章列表") |
| | | public R<Page<MgtArticlePageVo>> pageArticle(@RequestBody MgtArticlePageDto mgtArticlePageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtArticlePageDto.setUserId(userId); |
| | |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/listRegion", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取省市区列表") |
| | | public R<List<RegionVo>> listRegion(){ |
| | | List<RegionVo> regionVoList = regionService.listRegionVo(); |
| | | return R.ok(regionVoList); |
| | | } |
| | | |
| | | @RequestMapping(value = "/listCity", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取省市列表") |
| | | public R<List<RegionVo>> listCity(){ |
| | | List<RegionVo> regionVoList = regionService.listRegionVo(); |
| | | return R.ok(regionVoList); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pageAllotRecommend", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取推荐分配列表") |
| | | public R<Page<MgtAllotRecommendPageVo>> pageAllotRecommend(@RequestBody MgtAllotRecommendPageDto mgtAllotRecommendPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtAllotRecommendPageDto.setUserId(userId); |
| | | Page<MgtAllotRecommendPageVo> page = new Page<>(); |
| | | page.setSize(mgtAllotRecommendPageDto.getPageSize()); |
| | | page.setCurrent(mgtAllotRecommendPageDto.getPageNum()); |
| | | List<MgtAllotRecommendPageVo> allotRecommendPageVoList = recommendCooperationService.pageAllotRecommend(page, mgtAllotRecommendPageDto); |
| | | return R.ok(page.setRecords(allotRecommendPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/allotRecommend", method = RequestMethod.POST) |
| | | @ApiOperation(value = "删除文章") |
| | | public R allotRecommend(@RequestBody MgtAllotRecommendDto mgtAllotRecommendDto) { |
| | | mgtAllotRecommendDto.setUserId(SecurityUtils.getUserId()); |
| | | recommendCooperationService.allotRecommend(mgtAllotRecommendDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getBulletinBoard", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取看板统计") |
| | | public R<MgtBulletinBoardVo> getBulletinBoard() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | MgtBulletinBoardVo bulletinBoard = customConfigService.getBulletinBoard(); |
| | | return R.ok(bulletinBoard); |
| | | } |
| | | } |