diff --git a/Application/Home/Controller/TestResourceController.class.php b/Application/Home/Controller/TestResourceController.class.php index 4e3e7aa4b..21e23eabd 100644 --- a/Application/Home/Controller/TestResourceController.class.php +++ b/Application/Home/Controller/TestResourceController.class.php @@ -456,20 +456,20 @@ class TestResourceController extends BaseController private function checkAutoVerify($data) { $config = M('resource_verify_config', 'tab_') - ->where(['game_id' => $data['game_id']]) + ->where(['game_id' => $data['game_id'], 'status' => 1]) ->find(); if ($config) {//已存在该游戏的资源审核配置 - $isOldUser = M('test_resource', 'tab_') + $count = M('test_resource', 'tab_') ->where(['user_id' => $data['user_id']]) ->count(); - if (!$isOldUser) {//未申请过测试资源的新用户 + if ($count <= $config['new_apply_count']) {//新用户 //申请资源数量在最低额度和最高额度之间,自动审核 if ($data['apply_resource'] >= $config['new_low_value'] && $data['apply_resource'] <= $config['new_high_value']) { $data['verify_remark'] = '自动审核'; $data['verify_time'] = time(); $data['apply_status'] = 2; } - } else {//已申请过测试资源(非新用户) + } else {//非新用户 $promoteAllRecharge = sum_promote_total_money($data['promote_id']);//总充值量 $autoVerifyValue = $promoteAllRecharge * $config['old_value_ratio']; if ($data['apply_resource'] <= $autoVerifyValue) {