Commit 41e90fea by 段启岩

博客浏览量修复

parent 5ec905b4
......@@ -22,6 +22,7 @@ import cn.meteor.beyondclouds.util.SubjectUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.common.protocol.types.Field;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -160,8 +161,10 @@ public class UserStatisticsListener implements DataItemChangeListener {
}
if (itemType.equals(DataItemType.BLOG_VIEW_NUM)) {
Blog blog = blogService.getById(itemId);
String userId = blog.getUserId();
// 更新博客浏览量
updateUserStatisticValue(operatorId, "blog_view_num", blogService.allBlogViewCount(operatorId));
updateUserStatisticValue(userId, "blog_view_num", blogService.allBlogViewCount(userId));
}
if (itemType.equals(DataItemType.PROJECT)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment