1
This commit is contained in:
parent
c47a35f050
commit
430e43b72d
@ -62,6 +62,7 @@ CREATE TABLE `user` (
|
|||||||
`keys_num` int(11) NOT NULL COMMENT '钥匙数量',
|
`keys_num` int(11) NOT NULL COMMENT '钥匙数量',
|
||||||
`battle_re_times` int(11) NOT NULL COMMENT '每日战斗奖励次数',
|
`battle_re_times` int(11) NOT NULL COMMENT '每日战斗奖励次数',
|
||||||
`shop_flush_times` int(11) NOT NULL COMMENT '每日商店刷新次数',
|
`shop_flush_times` int(11) NOT NULL COMMENT '每日商店刷新次数',
|
||||||
|
`kefu_status` int(11) NOT NULL COMMENT '客服奖励状态(0:未领取,1:已领取)',
|
||||||
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;
|
||||||
|
@ -100,9 +100,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) ' .
|
$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) ' .
|
||||||
' 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) ' .
|
' 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) ' .
|
||||||
' 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;',
|
' 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;',
|
||||||
array(
|
array(
|
||||||
':accountid' => $account_id,
|
':accountid' => $account_id,
|
||||||
':user_name' => $user_name,
|
':user_name' => $user_name,
|
||||||
@ -128,7 +128,8 @@ class RoleController{
|
|||||||
'coin_num' => 0,
|
'coin_num' => 0,
|
||||||
'first_fight' => 0,
|
'first_fight' => 0,
|
||||||
'collect_status' => 0,
|
'collect_status' => 0,
|
||||||
'keys_num' => 0
|
'keys_num' => 0,
|
||||||
|
'kefu_status' => 0
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
@ -145,7 +146,8 @@ class RoleController{
|
|||||||
'coin_num' => $row['coin_num'],
|
'coin_num' => $row['coin_num'],
|
||||||
'first_fight' => $row['first_fight'],
|
'first_fight' => $row['first_fight'],
|
||||||
'collect_status' => $row['collect_status'],
|
'collect_status' => $row['collect_status'],
|
||||||
'keys_num' => $row['keys_num']
|
'keys_num' => $row['keys_num'],
|
||||||
|
'kefu_status' => $row['kefu_status'],
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -393,7 +393,7 @@ class ShareController{
|
|||||||
$url = 'https://gamemail-test.kingsome.cn/webapp/index.php?c=Mail&a=getAttachment&';
|
$url = 'https://gamemail-test.kingsome.cn/webapp/index.php?c=Mail&a=getAttachment&';
|
||||||
}
|
}
|
||||||
$params = array(
|
$params = array(
|
||||||
'account_id' => $REQUEST['account_id'],
|
'account_id' => $_REQUEST['account_id'],
|
||||||
'mail_ids' => $mail_id,
|
'mail_ids' => $mail_id,
|
||||||
'session_id' => $_REQUEST['session_id']
|
'session_id' => $_REQUEST['session_id']
|
||||||
);
|
);
|
||||||
@ -440,6 +440,17 @@ class ShareController{
|
|||||||
'item_num' => $item_num,
|
'item_num' => $item_num,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
//更新状态
|
||||||
|
$ret = $conn->execScript('UPDATE user SET kefu_status=1, modify_time=:modify_time ' .
|
||||||
|
' WHERE accountid=:accountid;',
|
||||||
|
array(
|
||||||
|
':accountid' => $account_id,
|
||||||
|
':modify_time' => time(),
|
||||||
|
));
|
||||||
|
if (!$ret) {
|
||||||
|
die();
|
||||||
|
return;
|
||||||
|
}
|
||||||
echo json_encode(array(
|
echo json_encode(array(
|
||||||
'errcode' => $errcode,
|
'errcode' => $errcode,
|
||||||
'errmsg' => $errmsg,
|
'errmsg' => $errmsg,
|
||||||
@ -474,7 +485,7 @@ class ShareController{
|
|||||||
$weight_array = $this->getExplode($d['weight']);
|
$weight_array = $this->getExplode($d['weight']);
|
||||||
for ($i = 0; $i < count($weight_array); $i++) {
|
for ($i = 0; $i < count($weight_array); $i++) {
|
||||||
$weight_sum += $weight_array[$i][0];
|
$weight_sum += $weight_array[$i][0];
|
||||||
}
|
}
|
||||||
srand(crc32($account_id . $mail_id));
|
srand(crc32($account_id . $mail_id));
|
||||||
$random = Rand(0, $weight_sum);
|
$random = Rand(0, $weight_sum);
|
||||||
$weight = 0;
|
$weight = 0;
|
||||||
|
@ -159,8 +159,8 @@ class SignController{
|
|||||||
$quest = new classes\Quest();
|
$quest = new classes\Quest();
|
||||||
$quest->triggerQuest(QUEST_DAY_LOGIN, 1, 1, $account_id);
|
$quest->triggerQuest(QUEST_DAY_LOGIN, 1, 1, $account_id);
|
||||||
$quest->triggerQuest(QUEST_SUM_LOGIN, 2, 1, $account_id);
|
$quest->triggerQuest(QUEST_SUM_LOGIN, 2, 1, $account_id);
|
||||||
//刷新战斗结算奖励次数和商店刷新次数
|
//刷新战斗结算奖励次数,商店刷新次数,客服
|
||||||
$battle_ret = $conn->execScript('UPDATE user SET battle_re_times=0, shop_flush_times=0, modify_time=:modify_time ' .
|
$battle_ret = $conn->execScript('UPDATE user SET battle_re_times=0, shop_flush_times=0, kefu_status=0, modify_time=:modify_time ' .
|
||||||
' WHERE accountid=:accountid;',
|
' WHERE accountid=:accountid;',
|
||||||
array(
|
array(
|
||||||
':accountid' => $account_id,
|
':accountid' => $account_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user