From d34b8bd549cca42dbd9f0d905aa4e82049bee5c2 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 18 Nov 2021 19:21:08 +0800 Subject: [PATCH] 1 --- .../controller/PropertyController.class.php | 35 ------------------- webapp/controller/RoleController.class.php | 33 ++++++++++++++++- webapp/index.php | 3 +- 3 files changed, 34 insertions(+), 37 deletions(-) delete mode 100644 webapp/controller/PropertyController.class.php diff --git a/webapp/controller/PropertyController.class.php b/webapp/controller/PropertyController.class.php deleted file mode 100644 index e28f18b..0000000 --- a/webapp/controller/PropertyController.class.php +++ /dev/null @@ -1,35 +0,0 @@ -getMysql($account_id); - $sqlStr = "SELECT coin_num FROM user WHERE accountid=:accountid; "; - $row = $conn->execQuery($sqlStr,array(':accountid' => $account_id)); - if($row) { - error_log("UpdateMoney======".json_encode($row)); - } - else{ - error_log("Test06======="); - } - $this->sendDataToClient(1,"ok",$row[0]); - } - public function updateMoneyAndLottery() - { - $account_id = $_REQUEST['account_id']; - $conn = $this->getMysql($account_id); - $sqlStr = "SELECT coin_num,rmb_num FROM user WHERE accountid=:accountid; "; - $row = $conn->execQuery($sqlStr,array(':accountid' => $account_id)); - if($row) { - error_log("UpdateMoneyAndLottery======".json_encode($row)); - } - else{ - - } - $this->sendDataToClient(3,"ok",$row[0]); - } -} \ No newline at end of file diff --git a/webapp/controller/RoleController.class.php b/webapp/controller/RoleController.class.php index fa46c35..c84658f 100644 --- a/webapp/controller/RoleController.class.php +++ b/webapp/controller/RoleController.class.php @@ -2165,5 +2165,36 @@ class RoleController extends BaseAuthedController { 'all_item_list' => $all_item_list, )); } + + public function updateMoney() + { + $account_id = $_REQUEST['account_id']; + $conn = $this->getMysql($account_id); + $sqlStr = "SELECT coin_num FROM user WHERE accountid=:accountid; "; + $row = $conn->execQuery($sqlStr,array(':accountid' => $account_id)); + if($row) { + error_log("UpdateMoney======".json_encode($row)); + } + else{ + error_log("Test06======="); + } + $this->sendDataToClient(1,"ok",$row[0]); + } + + public function updateMoneyAndLottery() + { + $account_id = $_REQUEST['account_id']; + $conn = $this->getMysql($account_id); + $sqlStr = "SELECT coin_num,rmb_num FROM user WHERE accountid=:accountid; "; + $row = $conn->execQuery($sqlStr,array(':accountid' => $account_id)); + if($row) { + error_log("UpdateMoneyAndLottery======".json_encode($row)); + } + else{ + + } + $this->sendDataToClient(3,"ok",$row[0]); + } + } -?> + diff --git a/webapp/index.php b/webapp/index.php index 316ba4e..4ec871b 100644 --- a/webapp/index.php +++ b/webapp/index.php @@ -24,7 +24,8 @@ function loginVerify($accountid, $sessionid) } $rewriteRule = array( - 'NGun' => 'Gun' + 'NGun' => 'Gun', + 'Property' => 'Role' ); function getRewriteClass($oldC)