1
This commit is contained in:
parent
04d069dd49
commit
b055f9a5ad
@ -86,6 +86,7 @@ CREATE TABLE `user` (
|
|||||||
`daily_time` int(11) NOT NULL DEFAULT '0' COMMENT '每日刷新时间',
|
`daily_time` int(11) NOT NULL DEFAULT '0' COMMENT '每日刷新时间',
|
||||||
`free_box` int(11) NOT NULL DEFAULT '0' COMMENT '每日免费宝箱',
|
`free_box` int(11) NOT NULL DEFAULT '0' COMMENT '每日免费宝箱',
|
||||||
`chapingcount` int(11) NOT NULL DEFAULT '0' COMMENT '每日插屏次数',
|
`chapingcount` int(11) NOT NULL DEFAULT '0' COMMENT '每日插屏次数',
|
||||||
|
`aderrormaxcount` int(11) NOT NULL DEFAULT '0' COMMENT '每日插屏上限次数',
|
||||||
PRIMARY KEY (`idx`),
|
PRIMARY KEY (`idx`),
|
||||||
UNIQUE KEY `accountid` (`accountid`)
|
UNIQUE KEY `accountid` (`accountid`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
||||||
|
6
sql/gamedb2001_n_migrate_200610_02.sql
Normal file
6
sql/gamedb2001_n_migrate_200610_02.sql
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
begin;
|
||||||
|
|
||||||
|
alter table user add column `aderrormaxcount` int(11) NOT NULL DEFAULT '0' COMMENT '每日插屏上限次数';
|
||||||
|
|
||||||
|
insert into version (version) values(2020061002);
|
||||||
|
commit;
|
@ -210,6 +210,7 @@ class ActivityController{
|
|||||||
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
|
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$conn = $this->getMysql($account_id);
|
$conn = $this->getMysql($account_id);
|
||||||
if (!$conn) {
|
if (!$conn) {
|
||||||
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家');
|
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家');
|
||||||
@ -219,6 +220,7 @@ class ActivityController{
|
|||||||
array(
|
array(
|
||||||
':accountid' => $account_id
|
':accountid' => $account_id
|
||||||
));
|
));
|
||||||
|
|
||||||
if (!$row) {
|
if (!$row) {
|
||||||
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家');
|
phpcommon\sendError(ERR_USER_BASE + 2, '没有这个玩家');
|
||||||
return;
|
return;
|
||||||
|
@ -115,9 +115,9 @@ class RoleController{
|
|||||||
':accountid' => $account_id
|
':accountid' => $account_id
|
||||||
));
|
));
|
||||||
if (!$row) {
|
if (!$row) {
|
||||||
$ret = $conn->execScript('INSERT INTO user(accountid, user_name, avatar_url, game_times, win_times, kills, harm, add_HP, alive_time, coin_num, integral, kill_his, alive_time_his, harm_his, add_HP_his, act_share_time, act_share_status, create_time, modify_time, first_fight, collect_status, keys_num, battle_re_times, shop_flush_times, kefu_status, sign_sum, box_num, diamond_num, sum_coin, pass_status, score, season_status, recharge_times_total, first_gift, season_time, free_coin, free_diamond, season_end_score, kill_modifytime, win_modifytime, rank_modifytime, vip_score, first_login, daily_first_login, daily_time, free_box, chapingcount) ' .
|
$ret = $conn->execScript('INSERT INTO user(accountid, user_name, avatar_url, game_times, win_times, kills, harm, add_HP, alive_time, coin_num, integral, kill_his, alive_time_his, harm_his, add_HP_his, act_share_time, act_share_status, create_time, modify_time, first_fight, collect_status, keys_num, battle_re_times, shop_flush_times, kefu_status, sign_sum, box_num, diamond_num, sum_coin, pass_status, score, season_status, recharge_times_total, first_gift, season_time, free_coin, free_diamond, season_end_score, kill_modifytime, win_modifytime, rank_modifytime, vip_score, first_login, daily_first_login, daily_time, free_box, chapingcount, aderrormaxcount) ' .
|
||||||
' VALUES(:accountid, :user_name, :avatar_url, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, :create_time, :modify_time, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, :daily_time, 0, 0) ' .
|
' VALUES(:accountid, :user_name, :avatar_url, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, :create_time, :modify_time, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, :daily_time, 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, add_HP=0, alive_time=0, coin_num=0, integral=0, kill_his=0, alive_time_his=0, harm_his=0, add_HP_his=0, act_share_time=0, act_share_status=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, sign_sum=0, box_num=0, diamond_num=0, sum_coin=0, pass_status=0, score=0, season_status=1, recharge_times_total=0, first_gift=0, season_time=0, free_coin=0, free_diamond=0, season_end_score=0, kill_modifytime=0, win_modifytime=0, rank_modifytime=0, vip_score=0, first_login=0, daily_first_login=0, daily_time=:daily_time, free_box=0, chapingcount=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, add_HP=0, alive_time=0, coin_num=0, integral=0, kill_his=0, alive_time_his=0, harm_his=0, add_HP_his=0, act_share_time=0, act_share_status=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, sign_sum=0, box_num=0, diamond_num=0, sum_coin=0, pass_status=0, score=0, season_status=1, recharge_times_total=0, first_gift=0, season_time=0, free_coin=0, free_diamond=0, season_end_score=0, kill_modifytime=0, win_modifytime=0, rank_modifytime=0, vip_score=0, first_login=0, daily_first_login=0, daily_time=:daily_time, free_box=0, chapingcount=0, aderrormaxcount=0;',
|
||||||
array(
|
array(
|
||||||
':accountid' => $account_id,
|
':accountid' => $account_id,
|
||||||
':user_name' => $user_name,
|
':user_name' => $user_name,
|
||||||
@ -156,7 +156,8 @@ class RoleController{
|
|||||||
'first_login' => 0,
|
'first_login' => 0,
|
||||||
'daily_first_login' => 0,
|
'daily_first_login' => 0,
|
||||||
'free_box' => 0,
|
'free_box' => 0,
|
||||||
'chapingcount' => 0
|
'chapingcount' => 0,
|
||||||
|
'aderrormaxcount' => 0,
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
$ret = $conn->execScript('UPDATE user SET first_login=1 ' .
|
$ret = $conn->execScript('UPDATE user SET first_login=1 ' .
|
||||||
@ -191,8 +192,9 @@ class RoleController{
|
|||||||
$nowTime = phpcommon\getdayseconds(time());
|
$nowTime = phpcommon\getdayseconds(time());
|
||||||
$daily_first_login = $row['daily_first_login'];
|
$daily_first_login = $row['daily_first_login'];
|
||||||
$chapingcount = $row['chapingcount'];
|
$chapingcount = $row['chapingcount'];
|
||||||
|
$aderrormaxcount = $row['aderrormaxcount'];
|
||||||
if ($row['daily_time'] == 0 || ($nowTime - phpcommon\getdayseconds($row['daily_time']) > 0)) {
|
if ($row['daily_time'] == 0 || ($nowTime - phpcommon\getdayseconds($row['daily_time']) > 0)) {
|
||||||
$ret = $conn->execScript('UPDATE user SET daily_first_login=0, chapingcount=0, ' .
|
$ret = $conn->execScript('UPDATE user SET daily_first_login=0, ' .
|
||||||
'modify_time=:modify_time WHERE accountid=:accountid;',
|
'modify_time=:modify_time WHERE accountid=:accountid;',
|
||||||
array(
|
array(
|
||||||
':accountid' => $account_id,
|
':accountid' => $account_id,
|
||||||
@ -203,7 +205,6 @@ class RoleController{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$daily_first_login = 0;
|
$daily_first_login = 0;
|
||||||
$chapingcount = 0;
|
|
||||||
}
|
}
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'errcode' => 0,
|
'errcode' => 0,
|
||||||
@ -234,7 +235,8 @@ class RoleController{
|
|||||||
'coin_nums' => $row['coin_num'],
|
'coin_nums' => $row['coin_num'],
|
||||||
'diamond_nums' => $row['diamond_num'],
|
'diamond_nums' => $row['diamond_num'],
|
||||||
'free_box' => $row['free_box'],
|
'free_box' => $row['free_box'],
|
||||||
'chapingcount' => $chapingcount
|
'chapingcount' => $chapingcount,
|
||||||
|
'aderrormaxcount' => $aderrormaxcount
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -922,5 +924,46 @@ class RoleController{
|
|||||||
'chapingcount' => $chapingcount,
|
'chapingcount' => $chapingcount,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updateadErrorMaxCount()
|
||||||
|
{
|
||||||
|
$account_id = $_REQUEST['account_id'];
|
||||||
|
//登录校验
|
||||||
|
$login = loginVerify($account_id, $_REQUEST['session_id']);
|
||||||
|
if (!$login) {
|
||||||
|
phpcommon\sendError(ERR_USER_BASE + 1, 'session无效');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$conn = $this->getMysql($account_id);
|
||||||
|
if (!$conn) {
|
||||||
|
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$row = $conn->execQueryOne('SELECT aderrormaxcount FROM user WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id
|
||||||
|
));
|
||||||
|
if (!$row) {
|
||||||
|
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个玩家');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$aderrormaxcount = $row['aderrormaxcount'] + 1;
|
||||||
|
$ret = $conn->execScript('UPDATE user SET aderrormaxcount=:aderrormaxcount, modify_time=:modify_time ' .
|
||||||
|
' WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':modify_time' => time(),
|
||||||
|
':accountid' => $account_id,
|
||||||
|
':aderrormaxcount' => $aderrormaxcount
|
||||||
|
));
|
||||||
|
if (!$ret) {
|
||||||
|
die();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
echo json_encode(array(
|
||||||
|
'errcode' => 0,
|
||||||
|
'errmsg' => '',
|
||||||
|
'aderrormaxcount' => $aderrormaxcount
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -380,7 +380,7 @@ class SignController{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//刷新战斗结算奖励次数,商店刷新次数,客服, 每日免费金币钻石
|
//刷新战斗结算奖励次数,商店刷新次数,客服, 每日免费金币钻石
|
||||||
$battle_ret = $conn->execScript('UPDATE user SET battle_re_times=0, diamond_shop_flush_times=0, shop_flush_times=0, kefu_status=0, free_coin=0, free_diamond=0, modify_time=:modify_time, free_box=0 ' .
|
$battle_ret = $conn->execScript('UPDATE user SET battle_re_times=0, diamond_shop_flush_times=0, shop_flush_times=0, kefu_status=0, free_coin=0, free_diamond=0, modify_time=:modify_time, free_box=0, chapingcount=0, aderrormaxcount=0 ' .
|
||||||
' WHERE accountid=:accountid;',
|
' WHERE accountid=:accountid;',
|
||||||
array(
|
array(
|
||||||
':accountid' => $account_id,
|
':accountid' => $account_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user