From 3b08cae12ee0d26197ddf6cf36c30d6fc676047f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 9 Jul 2024 17:18:42 +0800 Subject: [PATCH] 1 --- .../controller/TempToolsController.class.php | 39 ++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/webapp/controller/TempToolsController.class.php b/webapp/controller/TempToolsController.class.php index 87cbf733..f2230ff0 100644 --- a/webapp/controller/TempToolsController.class.php +++ b/webapp/controller/TempToolsController.class.php @@ -578,8 +578,9 @@ EOD; )); } - public function reward() + public function punish() { + return; $gameDbConn = myself()->_getMysql(''); $rows = SqlHelper::ormSelect( $gameDbConn, @@ -642,4 +643,40 @@ EOD; return empty($row) ? 0 : $row['gold']; } + public function reward() + { + $gameDbConn = myself()->_getMysql(''); + $rows = SqlHelper::ormSelect( + $gameDbConn, + 't_test_reward070901', + array( + ) + ); + foreach ($rows as $row) { + if ($row['pre_send'] == 0) { + SqlHelper::update( + $gameDbConn, + 't_test_reward070901', + array( + 'account_id' => $row['account_id'], + ), + array( + 'pre_send' => 1 + ) + ); + SqlHelper::update( + $gameDbConn, + 't_test_reward070901', + array( + 'account_id' => $row['account_id'], + ), + array( + 'post_send' => 1 + ) + ); + } + } + echo 'ok'; + } + }