|
|
@@ -256,7 +256,7 @@ class UserNetwork extends \common\components\ActiveRecord
|
|
|
* @throws \yii\base\Exception
|
|
|
* @throws \yii\db\Exception
|
|
|
*/
|
|
|
- public static function getChildrenWithDeepAndLayer($userId, $deep, $loopedDeep = 1, $periodNum=null){
|
|
|
+ public static function getChildrenWithDeepAndLayer($userId, $deep, $loopedDeep = 1, $periodNum=null, $hiddenUser=[]){
|
|
|
$allData = self::getChildrenFromPeriod($userId, $periodNum);
|
|
|
if($allData){
|
|
|
$decLevelConfig = Cache::getDecLevelConfig();
|
|
|
@@ -273,10 +273,14 @@ class UserNetwork extends \common\components\ActiveRecord
|
|
|
// 'MOBILE' => $baseInfo['MOBILE'],
|
|
|
'PERIOD_AT' => $baseInfo['PERIOD_AT'],
|
|
|
]);
|
|
|
+ if(in_array($data['USER_ID'], $hiddenUser)){
|
|
|
+ unset($allData[$key]);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
// 获取字节点数量
|
|
|
$childNum = self::firstFloorChildNumFromPeriod($data['USER_ID'], $periodNum);
|
|
|
if($childNum > 0 && $loopedDeep < $deep){
|
|
|
- $child = self::getChildrenWithDeepAndLayer($data['USER_ID'], $deep, $loopedDeep + 1, $periodNum);
|
|
|
+ $child = self::getChildrenWithDeepAndLayer($data['USER_ID'], $deep, $loopedDeep + 1, $periodNum, $hiddenUser);
|
|
|
$leaf = false;
|
|
|
$icon = 'el-icon-user-solid';
|
|
|
}
|
|
|
@@ -297,7 +301,7 @@ class UserNetwork extends \common\components\ActiveRecord
|
|
|
$allData[$key]['displayNone'] = 'display-none';
|
|
|
}
|
|
|
}
|
|
|
- return $allData;
|
|
|
+ return array_values($allData);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -337,7 +341,7 @@ class UserNetwork extends \common\components\ActiveRecord
|
|
|
$table = self::getTableNameFromPeriod($periodNum);
|
|
|
$db = $table['db'];
|
|
|
$tableName = $table['tableName'];
|
|
|
- return $db->createCommand("SELECT USER_ID,TOP_DEEP,RELATIVE_LOCATION FROM {$tableName} WHERE PARENT_UID=:PARENT_UID AND USER_ID NOT IN (SELECT HIDDEN_USER_ID FROM AR_USER_NETWORK_HIDDEN WHERE USER_ID=:PARENT_UID)")->bindValues([':PARENT_UID'=>$userId])->queryAll();
|
|
|
+ return $db->createCommand("SELECT USER_ID,TOP_DEEP,RELATIVE_LOCATION FROM {$tableName} WHERE PARENT_UID=:PARENT_UID")->bindValues([':PARENT_UID'=>$userId])->queryAll();
|
|
|
}
|
|
|
|
|
|
/**
|