|
@@ -454,7 +454,11 @@ class PostRepositories
|
|
|
*/
|
|
|
public function updatePostData($request)
|
|
|
{
|
|
|
- $postId = $request['post_id'];
|
|
|
+ $postId = isset($request['post_id'])?$request['post_id']:0;
|
|
|
+ if(empty($postId)){
|
|
|
+ Log::debug("非帖子类操作,不操作帖子统计数量".json_encode($request));
|
|
|
+ return true;
|
|
|
+ }
|
|
|
$post = PostData::where('post_id', $postId)->first();
|
|
|
if (isset($request['behavior_flag']) && $request['behavior_flag'] == 'read') {
|
|
|
$post->pv += 1;
|