|
|
|
@ -205,7 +205,8 @@ class TestingResourceService
|
|
|
|
|
$strCondition = '1=1';
|
|
|
|
|
if ($promote) {
|
|
|
|
|
$promoteService = new PromoteService();
|
|
|
|
|
$strCondition .= ' and promote_id in (' . $promoteService->subInSql($promote) . ')';
|
|
|
|
|
$permissionPromote = $promoteService->getTSPermPromote($promote);
|
|
|
|
|
$strCondition .= ' and promote_id in (' . $promoteService->subInSql($permissionPromote) . ')';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$users = M('user', 'tab_')->field(['id', 'account'])->where(['account' => ['in', $newAccounts], '_string' => $strCondition])->select();
|
|
|
|
@ -293,8 +294,9 @@ class TestingResourceService
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$promoteService = new PromoteService();
|
|
|
|
|
$permissionPromote = $promoteService->getTSPermPromote($promote);
|
|
|
|
|
$testPromote = M('promote', 'tab_')->field(['id', 'chain'])->where(['id' => $testingRole['promote_id']])->find();
|
|
|
|
|
if (is_null($testPromote) || ($promote && !$promoteService->isSubOrSelf($testPromote, $promote))) {
|
|
|
|
|
if (is_null($testPromote) || ($permissionPromote && !$promoteService->isSubOrSelf($testPromote, $permissionPromote))) {
|
|
|
|
|
throw new \Exception('测试角色所属推广员异常');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -307,7 +309,7 @@ class TestingResourceService
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$bindPromote = M('promote', 'tab_')->field(['id', 'chain'])->where(['id' => $bindRole['promote_id']])->find();
|
|
|
|
|
if (is_null($bindPromote) || ($promote && !$promoteService->isSubOrSelf($bindPromote, $promote))) {
|
|
|
|
|
if (is_null($bindPromote) || ($permissionPromote && !$promoteService->isSubOrSelf($bindPromote, $permissionPromote))) {
|
|
|
|
|
throw new \Exception('玩家账号所属推广员异常');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -395,6 +397,7 @@ class TestingResourceService
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$promoteService = new PromoteService();
|
|
|
|
|
$permissionPromote = $promoteService->getTSPermPromote($promote);
|
|
|
|
|
|
|
|
|
|
$role = M('user_play_info', 'tab_')
|
|
|
|
|
->field(['id', 'role_id', 'promote_id', 'game_id', 'testing_other_quota'])
|
|
|
|
@ -418,7 +421,7 @@ class TestingResourceService
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$testPromote = M('promote', 'tab_')->field(['id', 'chain'])->where(['id' => $role['promote_id']])->find();
|
|
|
|
|
if (is_null($testPromote) || ($promote && !$promoteService->isSubOrSelf($testPromote, $promote))) {
|
|
|
|
|
if (is_null($testPromote) || ($permissionPromote && !$promoteService->isSubOrSelf($testPromote, $permissionPromote))) {
|
|
|
|
|
throw new \Exception('测试角色所属推广员异常');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -433,7 +436,7 @@ class TestingResourceService
|
|
|
|
|
}
|
|
|
|
|
$bindingRole['binding_time'] = $binding['create_time'];
|
|
|
|
|
$bindPromote = M('promote', 'tab_')->field(['id', 'chain'])->where(['id' => $bindingRole['promote_id']])->find();
|
|
|
|
|
if (is_null($bindPromote) || ($promote && !$promoteService->isSubOrSelf($bindPromote, $promote))) {
|
|
|
|
|
if (is_null($bindPromote) || ($permissionPromote && !$promoteService->isSubOrSelf($bindPromote, $permissionPromote))) {
|
|
|
|
|
throw new \Exception('绑定角色所属推广员异常');
|
|
|
|
|
}
|
|
|
|
|
/* if ($testPromote['id'] != $bindPromote['id']) {
|
|
|
|
|