|
|
@@ -7,6 +7,7 @@ use common\helpers\Cache;
|
|
|
use common\helpers\NetPoint;
|
|
|
use common\helpers\user\Info;
|
|
|
use common\helpers\user\Perf;
|
|
|
+use Exception;
|
|
|
use Yii;
|
|
|
use yii\data\Pagination;
|
|
|
use yii\helpers\Json;
|
|
|
@@ -104,16 +105,21 @@ class UserNetwork extends \common\components\ActiveRecord
|
|
|
unset($parentUidsArr);
|
|
|
$parentList = [];
|
|
|
foreach ($pageParentUids as $parentUid) {
|
|
|
- $parentNetInfo = static::find($isSlaves, $db)->select(['TOP_DEEP', 'LOCATION_TAG'])->where('USER_ID=:USER_ID', ['USER_ID'=>$parentUid])->asArray()->one();
|
|
|
- $parentList[] = [
|
|
|
- 'USER_ID' => $userId,
|
|
|
- 'TOP_DEEP' => $userNetInfo['TOP_DEEP'],
|
|
|
- 'PARENT_UID' => $parentUid,
|
|
|
- 'PARENT_DEEP' => $parentNetInfo['TOP_DEEP'],
|
|
|
-// 'LOCATION_TAG' => $userNetInfo['LOCATION_TAG'],
|
|
|
-// 'PARENT_LOCATION_TAG' => $parentNetInfo['LOCATION_TAG'],
|
|
|
- 'LOCATION' => substr($userNetInfo['LOCATION_TAG'], strlen($parentNetInfo['LOCATION_TAG']), 1),
|
|
|
- ];
|
|
|
+ try {
|
|
|
+ $parentNetInfo = static::find($isSlaves, $db)->select(['TOP_DEEP', 'LOCATION_TAG'])->where('USER_ID=:USER_ID', ['USER_ID'=>$parentUid])->asArray()->one();
|
|
|
+ $parentList[] = [
|
|
|
+ 'USER_ID' => $userId,
|
|
|
+ 'TOP_DEEP' => $userNetInfo['TOP_DEEP'],
|
|
|
+ 'PARENT_UID' => $parentUid,
|
|
|
+ 'PARENT_DEEP' => $parentNetInfo['TOP_DEEP'],
|
|
|
+ // 'LOCATION_TAG' => $userNetInfo['LOCATION_TAG'],
|
|
|
+ // 'PARENT_LOCATION_TAG' => $parentNetInfo['LOCATION_TAG'],
|
|
|
+ 'LOCATION' => substr($userNetInfo['LOCATION_TAG'], strlen($parentNetInfo['LOCATION_TAG']), 1),
|
|
|
+ ];
|
|
|
+ } catch (Exception $e) {
|
|
|
+ $file_name = date('Y-m-d', time()).'_usernetwork.php_error.log';
|
|
|
+ file_put_contents($file_name, '____'.$parentUid.'____', FILE_APPEND);
|
|
|
+ }
|
|
|
|
|
|
unset($parentUid, $parentNetInfo);
|
|
|
}
|