From 22140bd1ba8b4c60e83bda0a60f1d81b18648ac1 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 22 Jul 2019 10:20:44 +0800 Subject: [PATCH] 1 --- webapp/controller/CommanderController.class.php | 4 ++-- webapp/controller/RoleController.class.php | 10 +++++----- webapp/controller/ShopController.class.php | 8 +++++--- webapp/controller/TankController.class.php | 4 ++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/webapp/controller/CommanderController.class.php b/webapp/controller/CommanderController.class.php index 5699b2b..a03e230 100644 --- a/webapp/controller/CommanderController.class.php +++ b/webapp/controller/CommanderController.class.php @@ -114,8 +114,8 @@ class CommanderController{ $commander_status = 2; } $ret = $conn->execScript('INSERT INTO commander(accountid, commander_id, commander_status, fragment_id, fragment_num, commander_type, commander_level, experience_level, active_time, create_time, modify_time) ' . - ' VALUES(:account_id, :commander_id, :commander_status, :fragment_id, 0, :commander_type, 1, 0, 0, :create_time, :modify_time) ' . - ' ON DUPLICATE KEY UPDATE accountid=:account_id, commander_id=:commander_id, commander_status=:commander_status, fragment_id=:fragment_id, fragment_num=0, commander_type=:commander_type, commander_level=1, experience_level=0, active_time=0, modify_time=:modify_time;', + ' VALUES(:account_id, :commander_id, :commander_status, :fragment_id, 100000, :commander_type, 1, 0, 0, :create_time, :modify_time) ' . + ' ON DUPLICATE KEY UPDATE accountid=:account_id, commander_id=:commander_id, commander_status=:commander_status, fragment_id=:fragment_id, fragment_num=100000, commander_type=:commander_type, commander_level=1, experience_level=0, active_time=0, modify_time=:modify_time;', array( ':account_id' => $account_id, ':commander_id' => $i, diff --git a/webapp/controller/RoleController.class.php b/webapp/controller/RoleController.class.php index 24215be..838f1eb 100644 --- a/webapp/controller/RoleController.class.php +++ b/webapp/controller/RoleController.class.php @@ -84,8 +84,8 @@ class RoleController{ )); if (!$row) { $ret = $conn->execScript('INSERT INTO user(accountid, user_name, avatar_url, game_times, win_times, kills, harm, score, coin_num, diamond_num, kill_his, harm_his, create_time, modify_time, first_fight, collect_status, keys_num, battle_re_times, shop_flush_times, kefu_status, free_getbox) ' . - ' VALUES(:accountid, :user_name, :avatar_url, 0, 0, 0, 0, 0, 0, 0, 0, 0, create_time, :modify_time, 0, 0, 0, 0, 0, 0, 0) ' . - ' ON DUPLICATE KEY UPDATE accountid=:accountid, user_name=:user_name, avatar_url=:avatar_url, game_times=0, win_times=0, kills=0, harm=0, score=0, coin_num=0, diamond_num=0, kill_his=0, harm_his=0, modify_time=:modify_time, first_fight=0, collect_status=0, keys_num=0, battle_re_times=0, shop_flush_times=0, kefu_status=0, free_getbox=0;', + ' VALUES(:accountid, :user_name, :avatar_url, 0, 0, 0, 0, 0, 100000, 10000, 0, 0, create_time, :modify_time, 0, 0, 10000, 0, 0, 0, 0) ' . + ' ON DUPLICATE KEY UPDATE accountid=:accountid, user_name=:user_name, avatar_url=:avatar_url, game_times=0, win_times=0, kills=0, harm=0, score=0, coin_num=100000, diamond_num=10000, kill_his=0, harm_his=0, modify_time=:modify_time, first_fight=0, collect_status=0, keys_num=10000, battle_re_times=0, shop_flush_times=0, kefu_status=0, free_getbox=0;', array( ':accountid' => $account_id, ':user_name' => $user_name, @@ -107,12 +107,12 @@ class RoleController{ 'high_harm' => 0, 'harm' => 0, 'score' => 0, - 'coin_num' => 0, + 'coin_num' => 100000, 'first_fight' => 0, 'collect_status' => 0, - 'keys_num' => 0, + 'keys_num' => 10000, 'kefu_status' => 0, - 'diamond_num' => 0, + 'diamond_num' => 10000, 'free_getbox' => 0, )); } else { diff --git a/webapp/controller/ShopController.class.php b/webapp/controller/ShopController.class.php index 3bc2a46..f8a4846 100644 --- a/webapp/controller/ShopController.class.php +++ b/webapp/controller/ShopController.class.php @@ -126,14 +126,16 @@ class ShopController{ } $conn = $this->getMysql($account_id); if (!$conn) { + error_log(111); phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家'); return; } $row = $conn->execQueryOne('SELECT shop_flush_times FROM user WHERE accountid=:accountid;', - array( - ':accountid' => $account_id - )); + array( + ':accountid' => $account_id + )); if (!$row) { + error_log(11114324); phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家'); return; } diff --git a/webapp/controller/TankController.class.php b/webapp/controller/TankController.class.php index 505a6ad..6c9fcab 100644 --- a/webapp/controller/TankController.class.php +++ b/webapp/controller/TankController.class.php @@ -133,8 +133,8 @@ class TankController{ $tank_status = 2; } $ret = $conn->execScript('INSERT INTO tank(accountid, tank_id, tank_status, fragment_id, fragment_num, active_time, tank_level, experience_level, experience_type, create_time, modify_time) ' . - ' VALUES(:account_id, :tank_id, :tank_status, :fragment_id, 0, 0, 1, 0, 0, :create_time, :modify_time) ' . - ' ON DUPLICATE KEY UPDATE accountid=:account_id, tank_id=:tank_id, tank_status=:tank_status, fragment_id=:fragment_id, fragment_num=0, active_time=0, tank_level=1, experience_level=0, experience_type=0, modify_time=:modify_time;', + ' VALUES(:account_id, :tank_id, :tank_status, :fragment_id, 100000, 0, 1, 0, 0, :create_time, :modify_time) ' . + ' ON DUPLICATE KEY UPDATE accountid=:account_id, tank_id=:tank_id, tank_status=:tank_status, fragment_id=:fragment_id, fragment_num=100000, active_time=0, tank_level=1, experience_level=0, experience_type=0, modify_time=:modify_time;', array( ':account_id' => $account_id, ':tank_id' => $i,