优化:文创等级不参加及显示排名

This commit is contained in:
wuhui_zzw 2023-11-20 10:14:43 +08:00
parent ae21b0eb42
commit 8aa17c4cf0
2 changed files with 3 additions and 2 deletions

View File

@ -118,7 +118,7 @@ class TeamAgencyController extends BaseController
// 排名处理
$list['data'][$key]['rank_list'] = array_filter(array_map(function($rankInfo) use ($item){
$rankSort = (string)$rankInfo['up_log'][$item['uid']];
if($rankSort === '0' || $rankSort) {
if(($rankSort === '0' || $rankSort) && $rankInfo['level_type'] == 0) {
return [
'id' => $rankInfo['id'],
'level_name' => $rankInfo['level_name'],

View File

@ -232,7 +232,7 @@ class TeamDividendLevelModel extends BackendModel
public static function getRanking(){
// 获取全部经销商 以此来获取排名信息
$upRank = TeamDividendLevelModel::uniacid()
->select(['id','level_name','level_weight'])
->select(['id','level_name','level_weight','level_type'])
->with(['upLog'=>function($query){
$query->select(['id','uid','after_level_id','created_at'])
->orderBy('created_at','ASC')
@ -244,6 +244,7 @@ class TeamDividendLevelModel extends BackendModel
return [
'id' => $upItem->id,
'level_name' => $upItem->level_name,
'level_type' => $upItem->level_type,
'up_log' => array_flip($upItem->upLog->pluck('uid')->toArray()),
];
})->toArray();