From 1f4f00d6964f1ab3de658d0ac886d0df45656250 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Thu, 27 Feb 2020 13:48:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/TestResourceController.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Application/Home/Controller/TestResourceController.class.php b/Application/Home/Controller/TestResourceController.class.php index 2febe1a97..d7d9e865e 100644 --- a/Application/Home/Controller/TestResourceController.class.php +++ b/Application/Home/Controller/TestResourceController.class.php @@ -428,7 +428,7 @@ class TestResourceController extends BaseController $data['create_time']=time(); $data['apply_type']=0; - $data = $this->checkAutoVerify($data, $resource); + $data = $this->checkAutoVerify($data, $resource, $i); $model = M('test_resource', 'tab_')->add($data); $resource += $data['apply_resource']; if ($model) { @@ -455,8 +455,11 @@ class TestResourceController extends BaseController /** *判断申请资源是否自动审核 + * @param $data array 新增数据 + * @param $resource int 此次已申请资源 + * @param $thisCount int 批量申请的第几次 */ - private function checkAutoVerify($data, $resource = 0) + private function checkAutoVerify($data, $resource = 0, $thisCount = 0) { $config = M('resource_verify_config', 'tab_') ->where(['game_id' => $data['game_id'], 'status' => 1]) @@ -465,6 +468,7 @@ class TestResourceController extends BaseController $count = M('test_resource', 'tab_') ->where(['user_id' => $data['user_id'], 'game_id' => $data['game_id']]) ->count(); + $count += $thisCount; if ($count < $config['new_apply_count']) {//新用户 //申请资源数量在最低额度和最高额度之间,自动审核 if ($data['apply_resource'] >= $config['new_low_value'] && $data['apply_resource'] <= $config['new_high_value']) { @@ -595,7 +599,7 @@ class TestResourceController extends BaseController $data['create_time']=time(); $data['apply_type']=1; - $data = $this->checkAutoVerify($data, $resource); + $data = $this->checkAutoVerify($data, $resource, $key); $model = M('test_resource','tab_')->add($data); $resource += $data['apply_resource']; if($model===false){