From 0d9a18c865bc75bf552f619afcff6c7bb3e96555 Mon Sep 17 00:00:00 2001 From: wangwei01 Date: Fri, 26 Jul 2019 12:17:16 +0800 Subject: [PATCH] 1 --- webapp/controller/CommanderController.class.php | 4 ++-- webapp/controller/RoleController.class.php | 10 +++++----- webapp/controller/TankController.class.php | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/webapp/controller/CommanderController.class.php b/webapp/controller/CommanderController.class.php index a03e230..5699b2b 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, 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;', + ' 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;', array( ':account_id' => $account_id, ':commander_id' => $i, diff --git a/webapp/controller/RoleController.class.php b/webapp/controller/RoleController.class.php index fdc1765..37dca6e 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, 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;', + ' 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;', array( ':accountid' => $account_id, ':user_name' => $user_name, @@ -107,12 +107,12 @@ class RoleController{ 'high_harm' => 0, 'harm' => 0, 'score' => 0, - 'coin_num' => 100000, + 'coin_num' => 0, 'first_fight' => 0, 'collect_status' => 0, - 'keys_num' => 10000, + 'keys_num' => 0, 'kefu_status' => 0, - 'diamond_num' => 10000, + 'diamond_num' => 0, 'free_getbox' => 0, )); } else { diff --git a/webapp/controller/TankController.class.php b/webapp/controller/TankController.class.php index 6c9fcab..505a6ad 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, 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;', + ' 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;', array( ':account_id' => $account_id, ':tank_id' => $i,