修复增加文章浏览量
This commit is contained in:
parent
97b3da1f37
commit
898daf418c
|
|
@ -77,7 +77,6 @@ public class ArticleController {
|
|||
@GetMapping("/collect")
|
||||
public Object collect(@Validated PageParam pageParam) {
|
||||
Integer userId = LikeFrontThreadLocal.getUserId();
|
||||
System.out.println(userId);
|
||||
PageResult<ArticleCollectVo> list = iArticleService.collect(pageParam, userId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,6 +160,10 @@ public class ArticleServiceImpl implements IArticleService {
|
|||
vo.setCollect(articleCollect != null);
|
||||
vo.setImage(UrlUtil.toAbsoluteUrl(article.getImage()));
|
||||
vo.setCreateTime(TimeUtil.timestampToDate(article.getCreateTime()));
|
||||
|
||||
article.setVisit(article.getVisit() + 1);
|
||||
articleMapper.updateById(article);
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue