|
|
@ -212,7 +212,8 @@ class TestingResourceController extends ThinkController
|
|
|
|
'user_account' => '测试账号',
|
|
|
|
'user_account' => '测试账号',
|
|
|
|
'user_phone' => '手机号',
|
|
|
|
'user_phone' => '手机号',
|
|
|
|
'promote_account' => '所属推广员',
|
|
|
|
'promote_account' => '所属推广员',
|
|
|
|
'apply_promote_account' => '申请人',
|
|
|
|
'apply_username' => '申请人',
|
|
|
|
|
|
|
|
'verify_admin_username' => '审核人',
|
|
|
|
'apply_amount' => '申请金额',
|
|
|
|
'apply_amount' => '申请金额',
|
|
|
|
'provide_amount' => '发放金额',
|
|
|
|
'provide_amount' => '发放金额',
|
|
|
|
'verify_status_text' => '审核状态',
|
|
|
|
'verify_status_text' => '审核状态',
|
|
|
@ -230,10 +231,13 @@ class TestingResourceController extends ThinkController
|
|
|
|
|
|
|
|
|
|
|
|
$gameId = $params['game_id'] ?? 0;
|
|
|
|
$gameId = $params['game_id'] ?? 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$admins = M('ucenter_member', 'sys_')->field(['id', 'username'])->select();
|
|
|
|
|
|
|
|
|
|
|
|
$this->assign('verifyStatusList', TestingResourceRepository::$verifyStatusList);
|
|
|
|
$this->assign('verifyStatusList', TestingResourceRepository::$verifyStatusList);
|
|
|
|
$this->assign('provideStatusList', TestingResourceRepository::$provideStatusList);
|
|
|
|
$this->assign('provideStatusList', TestingResourceRepository::$provideStatusList);
|
|
|
|
$this->assign('servers', $gameRepository->getServersByGameId($gameId));
|
|
|
|
$this->assign('servers', $gameRepository->getServersByGameId($gameId));
|
|
|
|
$this->assign('games', $gameRepository->getChoiceGames());
|
|
|
|
$this->assign('games', $gameRepository->getChoiceGames());
|
|
|
|
|
|
|
|
$this->assign('admins', $admins);
|
|
|
|
$this->assign('count', $count);
|
|
|
|
$this->assign('count', $count);
|
|
|
|
$this->assign('_page', $pagination);
|
|
|
|
$this->assign('_page', $pagination);
|
|
|
|
$this->assign('records', $records);
|
|
|
|
$this->assign('records', $records);
|
|
|
@ -266,7 +270,6 @@ class TestingResourceController extends ThinkController
|
|
|
|
'user_account' => $role['user_account'],
|
|
|
|
'user_account' => $role['user_account'],
|
|
|
|
'server_name' => $role['server_name'],
|
|
|
|
'server_name' => $role['server_name'],
|
|
|
|
'role_name' => $role['role_name'],
|
|
|
|
'role_name' => $role['role_name'],
|
|
|
|
'apply_promote_account' => $applyPromote ? $applyPromote['account'] : '',
|
|
|
|
|
|
|
|
'promote_account' => $promote['account'],
|
|
|
|
'promote_account' => $promote['account'],
|
|
|
|
'ref_name' => $order['ref_name'],
|
|
|
|
'ref_name' => $order['ref_name'],
|
|
|
|
'ref_amount' => $order['ref_amount'],
|
|
|
|
'ref_amount' => $order['ref_amount'],
|
|
|
@ -337,9 +340,10 @@ class TestingResourceController extends ThinkController
|
|
|
|
public function doApply()
|
|
|
|
public function doApply()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$params = I('post.');
|
|
|
|
$params = I('post.');
|
|
|
|
|
|
|
|
$userAuth = session('user_auth');
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
$testingResourceService = new TestingResourceService();
|
|
|
|
$testingResourceService = new TestingResourceService();
|
|
|
|
$testingResourceService->apply($params);
|
|
|
|
$testingResourceService->apply($params, null, $userAuth['uid']);
|
|
|
|
return $this->ajaxReturn(['status' => 1, 'message' => '申请成功,等待审核。']);
|
|
|
|
return $this->ajaxReturn(['status' => 1, 'message' => '申请成功,等待审核。']);
|
|
|
|
} catch (\Throwable $e) {
|
|
|
|
} catch (\Throwable $e) {
|
|
|
|
return $this->ajaxReturn(['status' => 0, 'message' => $e->getMessage()]);
|
|
|
|
return $this->ajaxReturn(['status' => 0, 'message' => $e->getMessage()]);
|
|
|
@ -362,11 +366,13 @@ class TestingResourceController extends ThinkController
|
|
|
|
if (count($batches) == 0) {
|
|
|
|
if (count($batches) == 0) {
|
|
|
|
return $this->ajaxReturn(['status' => 0, 'message' => '无未审核批次']);
|
|
|
|
return $this->ajaxReturn(['status' => 0, 'message' => '无未审核批次']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$userAuth = session('user_auth');
|
|
|
|
foreach ($batches as $batch) {
|
|
|
|
foreach ($batches as $batch) {
|
|
|
|
if ($status == 1) {
|
|
|
|
if ($status == 1) {
|
|
|
|
$service->verify($batch);
|
|
|
|
$service->verify($batch, $userAuth['uid']);
|
|
|
|
} elseif ($status == 2) {
|
|
|
|
} elseif ($status == 2) {
|
|
|
|
$service->verifyRefuse($batch);
|
|
|
|
$remark = '审核拒绝';
|
|
|
|
|
|
|
|
$service->verifyRefuse($batch, $remark, $userAuth['uid']);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->ajaxReturn(['status' => 1, 'message' => '操作成功']);
|
|
|
|
return $this->ajaxReturn(['status' => 1, 'message' => '操作成功']);
|
|
|
@ -510,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();
|
|
|
@ -525,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),
|
|
|
@ -533,8 +545,8 @@ class TestingResourceController extends ThinkController
|
|
|
|
'user_account' => $role ? $role['user_account'] : '',
|
|
|
|
'user_account' => $role ? $role['user_account'] : '',
|
|
|
|
'server_name' => $role ? $role['server_name'] : '',
|
|
|
|
'server_name' => $role ? $role['server_name'] : '',
|
|
|
|
'role_name' => $role ? $role['role_name'] : '',
|
|
|
|
'role_name' => $role ? $role['role_name'] : '',
|
|
|
|
'apply_promote_account' => $applyPromote ? $applyPromote['account'] : '',
|
|
|
|
|
|
|
|
'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'],
|
|
|
@ -552,8 +564,8 @@ class TestingResourceController extends ThinkController
|
|
|
|
'server_name' => '区服名称',
|
|
|
|
'server_name' => '区服名称',
|
|
|
|
'user_account' => '测试账号',
|
|
|
|
'user_account' => '测试账号',
|
|
|
|
'role_name' => '角色名称',
|
|
|
|
'role_name' => '角色名称',
|
|
|
|
'apply_promote_account' => '申请人',
|
|
|
|
|
|
|
|
'promote_account' => '所属推广员',
|
|
|
|
'promote_account' => '所属推广员',
|
|
|
|
|
|
|
|
'verify_admin_username' => '审核人',
|
|
|
|
'ref_name' => '资源名称',
|
|
|
|
'ref_name' => '资源名称',
|
|
|
|
'ref_amount' => '资源价值',
|
|
|
|
'ref_amount' => '资源价值',
|
|
|
|
'num' => '申请数量',
|
|
|
|
'num' => '申请数量',
|
|
|
|