diff --git a/Application/Base/Repository/TestingResourceRepository.class.php b/Application/Base/Repository/TestingResourceRepository.class.php index 7cb179e7e..79231aa6e 100644 --- a/Application/Base/Repository/TestingResourceRepository.class.php +++ b/Application/Base/Repository/TestingResourceRepository.class.php @@ -440,7 +440,7 @@ class TestingResourceRepository $subBindingCondition = [ '_string' => 'tab_testing_binding.bind_role_id = tab_spend.game_player_id and ' . - 'tab_testing_binding.game_id = tab_spend.game_id and ' . + 'tab_testing_binding.bind_user_id = tab_spend.user_id and ' . 'UNIX_TIMESTAMP(FROM_UNIXTIME(tab_testing_binding.create_time, "%Y-%m-%d 00:00:00")) <= tab_spend.pay_time' ]; $spendRepository = new SpendRepository(); @@ -499,7 +499,6 @@ class TestingResourceRepository $gameSettings = index_by_column('base_game_id', $gameSettings); $gameRepository = new GameRepository(); $baseGames = $gameRepository->getBaseGames(); - $records = []; foreach ($roles as $role) { $user = $users[$role['user_id']] ?? null; @@ -514,6 +513,7 @@ class TestingResourceRepository } $spendQuota = 0; + $quota = 0; if ($binding) { $gameIds = $gameRepository->getGameIdsByBaseGame($baseGame); foreach ($gameIds as $gameId) {