|
@@ -4,6 +4,7 @@ use App\Models\Behavior;
|
|
use App\Models\CommentRecord;
|
|
use App\Models\CommentRecord;
|
|
use App\Models\GeneralRecord;
|
|
use App\Models\GeneralRecord;
|
|
use App\Models\Post;
|
|
use App\Models\Post;
|
|
|
|
+use App\Traits\UserTrait;
|
|
use App\Models\RegisteredRecord;
|
|
use App\Models\RegisteredRecord;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\Log;
|
|
use Illuminate\Support\Facades\Log;
|
|
@@ -11,6 +12,7 @@ use Tymon\JWTAuth\Facades\JWTAuth;
|
|
use Illuminate\Support\Facades\Redis;
|
|
use Illuminate\Support\Facades\Redis;
|
|
class BeanRepository
|
|
class BeanRepository
|
|
{
|
|
{
|
|
|
|
+ use UserTrait;
|
|
public function beanDetail($request)
|
|
public function beanDetail($request)
|
|
{
|
|
{
|
|
try {
|
|
try {
|
|
@@ -141,9 +143,10 @@ class BeanRepository
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- $user_ids = array_column($excellent_residents,'content_author_id');
|
|
|
|
- $content_author_id = array_unique($user_ids);
|
|
|
|
- $author_data = $this->followDetail($content_author_id);
|
|
|
|
|
|
+ $content_author_id = array_column($excellent_residents,'content_author_id');
|
|
|
|
+ $uids = array_unique($content_author_id);
|
|
|
|
+ $author_data = $this->getFollowMembersStatus($uids);
|
|
|
|
+
|
|
if (count($author_data)>0){
|
|
if (count($author_data)>0){
|
|
foreach ($author_data as $key=>$val){
|
|
foreach ($author_data as $key=>$val){
|
|
foreach ($excellent_residents as $k=>$v){
|
|
foreach ($excellent_residents as $k=>$v){
|
|
@@ -154,7 +157,8 @@ class BeanRepository
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }var_dump($uids);
|
|
|
|
+ var_dump($author_data);die;
|
|
|
|
|
|
return $excellent_residents;
|
|
return $excellent_residents;
|
|
}
|
|
}
|
|
@@ -174,19 +178,4 @@ class BeanRepository
|
|
return $all_best_author;
|
|
return $all_best_author;
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
- function followDetail($content_author_id)
|
|
|
|
- {
|
|
|
|
- try {
|
|
|
|
- $sign = generateSign([], config('customer.app_secret'));
|
|
|
|
- $url = config("customer.app_service_url").'/user/v2/member/getMemberIds';
|
|
|
|
- $array = [
|
|
|
|
- 'json' => ['sign' => $sign, 'uids' => $content_author_id], 'query' => [], 'http_errors' => false,'headers'=>['Authorization'=>"Bearer ".JWTAuth::getToken()]
|
|
|
|
- ];
|
|
|
|
- return http($url,$array,'get');
|
|
|
|
- } catch (\Exception $e) {
|
|
|
|
- Log::debug("followDetail:".$e->getMessage());
|
|
|
|
- return [];
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|