| | |
| | | @GetMapping("/detail") |
| | | @ApiOperationSupport(order = 1) |
| | | @ApiOperation(value = "详情", notes = "传入articleoy") |
| | | public R<Article> detail(Article article) { |
| | | Article detail = articleService.getOne(Condition.getQueryWrapper(article)); |
| | | public R<Article> detail(ArticleVO article) { |
| | | ArticleVO detail = articleService.getArticleOne(article); |
| | | UpdateWrapper<Article> objectUpdateWrapper = new UpdateWrapper<>(); |
| | | objectUpdateWrapper.setSql("view_number = view_number + 1"); |
| | | objectUpdateWrapper.eq("id", article.getId()); |
| | | articleService.update(null, objectUpdateWrapper); |
| | | // List<List<String>> lists = new ArrayList<>(); |
| | | // if (StringUtils.isNotBlank(detail.getArticleRange())) { |
| | | // lists = (List<List<String>>) JSON.parse(detail.getArticleRange()); |
| | | // } |
| | | // detail.setArticleList(lists); |
| | | return R.data(detail); |
| | | } |
| | | |