|
@@ -611,6 +611,14 @@ class PostRepositories
|
|
|
$post->pv += 1;
|
|
|
$post->pv_real += 1;
|
|
|
Redis::HINCRBY($postInfoKey,'pv',1);
|
|
|
+ $topicIdStr = Redis::HGET($postInfoKey,'topic_ids');
|
|
|
+ if($topicIdStr){
|
|
|
+ Log::debug('话题增加浏览量'.$topicIdStr);
|
|
|
+ $topicIds = explode(',', $topicIdStr);
|
|
|
+ foreach($topicIds as $id){
|
|
|
+ $this->topic->where('id', $id)->increment('pv');
|
|
|
+ }
|
|
|
+ }
|
|
|
Log::debug("帖子:".$postId."被阅读,pv +1");
|
|
|
} elseif (isset($request['behavior_flag']) && $request['behavior_flag'] == 'unlike') {
|
|
|
//用户不喜欢帖子key
|