From af693fc5a8ab5da158e368f99ab3b01f250ad865 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 23 Sep 2021 15:36:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/TestingResourceService.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Application/Base/Service/TestingResourceService.class.php b/Application/Base/Service/TestingResourceService.class.php index 99bde3376..791e7c656 100644 --- a/Application/Base/Service/TestingResourceService.class.php +++ b/Application/Base/Service/TestingResourceService.class.php @@ -414,6 +414,10 @@ class TestingResourceService throw new \Exception('区服不存在'); } + if (count($records) > 9) { + throw new \Exception('一次不能超过9笔'); + } + $role = M('user_play_info', 'tab_') ->field(['id', 'role_id', 'promote_id', 'game_id', 'testing_other_quota']) ->where(['user_id' => $user['id'], 'game_id' => $gameId, 'server_id' => $server['server_id'], 'role_id' => $roleId]) @@ -545,6 +549,7 @@ class TestingResourceService 'remark' => $record['remark'], ]; M('testing_resource_order', 'tab_')->add($order); + $i ++; } $model->commit(); } catch (\Exception $e) {