Browse Source

朋友圈消息提醒接口优化

master
wanghongjun 7 months ago
parent
commit
37460b22d6
  1. 7
      app/enterprise/controller/Posts.php

7
app/enterprise/controller/Posts.php

@ -634,11 +634,9 @@ class Posts extends BaseController
if ($comment['user_id']) { if ($comment['user_id']) {
$item['option_user'] = $this->getFriendUserInfo($comment['user_id']); $item['option_user'] = $this->getFriendUserInfo($comment['user_id']);
} }
if ($comment['relevance_id']) {
$item['posts_user_id'] = PostsModel::where('id', $comment['relevance_id'])->value('user_id');
}
} }
} }
$item['posts_user_id'] = PostsModel::where('id', $item['posts_id'])->value('user_id');
if ($item['type'] == 1) { if ($item['type'] == 1) {
$likesWhere = [ $likesWhere = [
'id' => $item['relevance_id'], 'id' => $item['relevance_id'],
@ -649,9 +647,6 @@ class Posts extends BaseController
if ($Likes['user_id']) { if ($Likes['user_id']) {
$item['option_user'] = $this->getFriendUserInfo($Likes['user_id']); $item['option_user'] = $this->getFriendUserInfo($Likes['user_id']);
} }
if ($Likes['relevance_id']) {
$item['posts_user_id'] = PostsModel::where('id', $Likes['relevance_id'])->value('user_id');
}
} }
} }
// 用户信息 // 用户信息

Loading…
Cancel
Save