|
|
@ -516,6 +516,10 @@ class TestingResourceController extends ThinkController
|
|
|
|
$applyPromotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($batches, 'apply_promote_id')]])->select();
|
|
|
|
$applyPromotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($batches, 'apply_promote_id')]])->select();
|
|
|
|
$applyPromotes = index_by_column('id', $applyPromotes);
|
|
|
|
$applyPromotes = index_by_column('id', $applyPromotes);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$verifyAdminIds = array_column($batches, 'verify_admin_id');
|
|
|
|
|
|
|
|
$verifyAdmins = M('ucenter_member', 'sys_')->field(['id', 'username'])->where(['id' => ['in', $verifyAdminIds]])->select();
|
|
|
|
|
|
|
|
$verifyAdmins = index_by_column('id', $verifyAdmins);
|
|
|
|
|
|
|
|
|
|
|
|
$promotes = [];
|
|
|
|
$promotes = [];
|
|
|
|
if (count($roles) > 0) {
|
|
|
|
if (count($roles) > 0) {
|
|
|
|
$promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($roles, 'promote_id')]])->select();
|
|
|
|
$promotes = M('promote', 'tab_')->field(['id', 'account'])->where(['id' => ['in', array_column($roles, 'promote_id')]])->select();
|
|
|
@ -531,6 +535,8 @@ class TestingResourceController extends ThinkController
|
|
|
|
$role = isset($roles[$roleKey]) ? $roles[$roleKey] : null;
|
|
|
|
$role = isset($roles[$roleKey]) ? $roles[$roleKey] : null;
|
|
|
|
$applyPromote = $applyPromotes[$batch['apply_promote_id']] ?? null;
|
|
|
|
$applyPromote = $applyPromotes[$batch['apply_promote_id']] ?? null;
|
|
|
|
$promote = $role ? ($promotes[$role['promote_id']] ?? null) : null;
|
|
|
|
$promote = $role ? ($promotes[$role['promote_id']] ?? null) : null;
|
|
|
|
|
|
|
|
$verifyAdmin = $verifyAdmins[$batch['verify_admin_id']] ?? null;
|
|
|
|
|
|
|
|
|
|
|
|
$records[] = [
|
|
|
|
$records[] = [
|
|
|
|
'id' => $order['id'],
|
|
|
|
'id' => $order['id'],
|
|
|
|
'batch_no' => substr($batch['batch_no'], 14),
|
|
|
|
'batch_no' => substr($batch['batch_no'], 14),
|
|
|
@ -540,6 +546,7 @@ class TestingResourceController extends ThinkController
|
|
|
|
'server_name' => $role ? $role['server_name'] : '',
|
|
|
|
'server_name' => $role ? $role['server_name'] : '',
|
|
|
|
'role_name' => $role ? $role['role_name'] : '',
|
|
|
|
'role_name' => $role ? $role['role_name'] : '',
|
|
|
|
'promote_account' => $promote ? $promote['account'] : '',
|
|
|
|
'promote_account' => $promote ? $promote['account'] : '',
|
|
|
|
|
|
|
|
'verify_admin_username' => $verifyAdmin ? $verifyAdmin['username'] : '系統',
|
|
|
|
'ref_name' => $order['ref_name'],
|
|
|
|
'ref_name' => $order['ref_name'],
|
|
|
|
'ref_amount' => $order['ref_amount'],
|
|
|
|
'ref_amount' => $order['ref_amount'],
|
|
|
|
'num' => $order['num'],
|
|
|
|
'num' => $order['num'],
|
|
|
@ -558,6 +565,7 @@ class TestingResourceController extends ThinkController
|
|
|
|
'user_account' => '测试账号',
|
|
|
|
'user_account' => '测试账号',
|
|
|
|
'role_name' => '角色名称',
|
|
|
|
'role_name' => '角色名称',
|
|
|
|
'promote_account' => '所属推广员',
|
|
|
|
'promote_account' => '所属推广员',
|
|
|
|
|
|
|
|
'verify_admin_username' => '审核人',
|
|
|
|
'ref_name' => '资源名称',
|
|
|
|
'ref_name' => '资源名称',
|
|
|
|
'ref_amount' => '资源价值',
|
|
|
|
'ref_amount' => '资源价值',
|
|
|
|
'num' => '申请数量',
|
|
|
|
'num' => '申请数量',
|
|
|
|