|
|
|
@ -165,7 +165,7 @@ class TestingResourceRepository
|
|
|
|
|
$applyAdmins = index_by_column('id', $applyAdmins);
|
|
|
|
|
|
|
|
|
|
if (count($users) > 0) {
|
|
|
|
|
$promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($users, 'promote_id')]])->select();
|
|
|
|
|
$promotes = M('promote', 'tab_')->field(['id', 'account', 'level1_id'])->where(['id' => ['in', array_column($users, 'promote_id')]])->select();
|
|
|
|
|
$promotes = index_by_column('id', $promotes);
|
|
|
|
|
}
|
|
|
|
|
$verifyAdminIds = array_column($batches, 'verify_admin_id');
|
|
|
|
@ -236,6 +236,7 @@ class TestingResourceRepository
|
|
|
|
|
$promotes = $result['promotes'];
|
|
|
|
|
$verifyAdmins = $result['verifyAdmins'];
|
|
|
|
|
$applyAdmins = $result['applyAdmins'];
|
|
|
|
|
$levelTopPromotes = M('promote', 'tab_')->where(['id' => ['in', array_unique(array_column($promotes,'level1_id'))]])->getField('id,account',true);
|
|
|
|
|
//获取申请人
|
|
|
|
|
$records = [];
|
|
|
|
|
foreach ($items as $batch) {
|
|
|
|
@ -244,6 +245,7 @@ class TestingResourceRepository
|
|
|
|
|
$user = $users[$batch['user_id']] ?? null;
|
|
|
|
|
$applyPromote = $applyPromotes[$batch['apply_promote_id']] ?? null;
|
|
|
|
|
$promote = $user && isset($promotes[$user['promote_id']]) ? $promotes[$user['promote_id']] : null;
|
|
|
|
|
$levelTopPromote = $promote && isset($levelTopPromotes[$promote['level1_id']]) ? $levelTopPromotes[$promote['level1_id']] : null;
|
|
|
|
|
$verifyAdmin = $verifyAdmins[$batch['verify_admin_id']] ?? null;
|
|
|
|
|
$applyAdmin = $applyAdmins[$batch['apply_admin_id']] ?? null;
|
|
|
|
|
$jumpParm = [
|
|
|
|
@ -262,6 +264,7 @@ class TestingResourceRepository
|
|
|
|
|
'user_account' => $role ?$role['user_account'] : '--',
|
|
|
|
|
'apply_username' => $applyPromote ? $applyPromote['account'] . '[推广员]' : ($applyAdmin ? $applyAdmin['username'] . '[管理员]' : ''),
|
|
|
|
|
'promote_account' => $promote['account'],
|
|
|
|
|
'level_top_promote'=>$levelTopPromote,
|
|
|
|
|
'apply_amount' => $batch['apply_amount'],
|
|
|
|
|
'provide_amount' => $batch['provide_amount'],
|
|
|
|
|
'jump_url'=>$jumpUrl
|
|
|
|
|