| | |
| | | * @param article 资讯对象信息 |
| | | */ |
| | | @PostMapping("/submit") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改资讯信息", notes = "传入article") |
| | | public R submit(@RequestBody ArticleVO article) { |
| | | if (null == article.getId()) { |
| | | if (null == article.getCreateTime()) { |
| | |
| | | * 批量修改评论区状态 |
| | | */ |
| | | @PostMapping("/upcomment") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "批量修改评论区状态", notes = "传入article") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids, String type) { |
| | | String[] split = ids.split(","); |
| | | String strArrays = ""; |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectArticleG") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "查询个人资讯", notes = "传入article") |
| | | public R<IPage<Article>> selectArticleG(ArticleVO article, Query query) { |
| | | return R.data(articleService.selectArticleG(Condition.getPage(query), article)); |
| | | } |
| | | |
| | | /** |
| | | * 通知公告表浏览数量加一 |
| | | * 通知公告表浏览数量加一(反诈的居民查看会得积分) |
| | | */ |
| | | @PostMapping("/addNumber") |
| | | @ApiOperationSupport(order = 8) |
| | | @ApiOperation(value = "添加浏览数量", notes = "传入notice") |
| | | public R addNumber(@Valid @RequestBody Article notice) { |
| | | public R addNumber(@Valid @RequestBody ArticleVO notice) { |
| | | UpdateWrapper<Article> objectUpdateWrapper = new UpdateWrapper<>(); |
| | | objectUpdateWrapper.setSql("view_number = view_number + 1"); |
| | | objectUpdateWrapper.eq("id", notice.getId()); |
| | | return R.status(articleService.update(null, objectUpdateWrapper)); |
| | | return R.status(articleService.updateArticle(objectUpdateWrapper,notice.getId(),notice.getHouseCode())); |
| | | } |
| | | } |