|
@@ -95,8 +95,12 @@ class BeanRepository
|
|
|
|
|
|
}elseif ($request['type'] == 1){//排行榜人脉达人
|
|
|
$registered_mosts = Redis::get('yesterday_registered_most');
|
|
|
- $registered_most = json_decode($registered_mosts,true);
|
|
|
- if ($registered_most){
|
|
|
+ if ($registered_mosts){
|
|
|
+ $registered_most = json_decode($registered_mosts,true);
|
|
|
+ }else{
|
|
|
+ $registered_most = [];
|
|
|
+ }
|
|
|
+ if (count($registered_most) > 0) {
|
|
|
$superior_uid = array_column($registered_most,'superior_uid');
|
|
|
$uids = implode(',', array_unique($superior_uid));
|
|
|
$user_data = $this->getFollowMembersStatus($uids);
|
|
@@ -116,8 +120,12 @@ class BeanRepository
|
|
|
|
|
|
}else{//排行榜最佳作者
|
|
|
$all_best_authors = Redis::get('yesterday_best_author');
|
|
|
- $all_best_author = json_decode($all_best_authors,true);
|
|
|
- if ($all_best_author){
|
|
|
+ if ($all_best_authors){
|
|
|
+ $all_best_author = json_decode($all_best_authors,true);
|
|
|
+ }else{
|
|
|
+ $all_best_author = [];
|
|
|
+ }
|
|
|
+ if (count($all_best_author) > 0) {
|
|
|
$content_author_id = array_column($all_best_author,'content_author_id');
|
|
|
$uids = implode(',', array_unique($content_author_id));
|
|
|
$user_data = $this->getFollowMembersStatus($uids);
|