This commit is contained in:
aozhiwei 2021-11-26 19:54:59 +08:00
parent 6cafa8c40b
commit 44ccdc20a0
15 changed files with 133 additions and 112 deletions

View File

@ -28,7 +28,7 @@ DROP TABLE IF EXISTS `t_user`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_user` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`name` tinyblob COMMENT '用户名字',
`sex` int(11) NOT NULL DEFAULT '0' COMMENT '性别',
`head_id` int(11) NOT NULL DEFAULT '0' COMMENT '头像id',
@ -42,7 +42,7 @@ CREATE TABLE `t_user` (
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid` (`accountid`)
UNIQUE KEY `account_id` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -55,7 +55,7 @@ DROP TABLE IF EXISTS `t_hero`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_hero` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'accountid',
`account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id',
`hero_id` int(11) NOT NULL DEFAULT '0' COMMENT '英雄id',
`skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '皮肤id',
`hero_lv` int(11) NOT NULL DEFAULT '0' COMMENT '英雄等级',
@ -67,7 +67,7 @@ CREATE TABLE `t_hero` (
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid_hero_id` (`accountid`, `hero_id`)
UNIQUE KEY `account_id_hero_id` (`account_id`, `hero_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -80,7 +80,7 @@ DROP TABLE IF EXISTS `t_hero_skin`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_hero_skin` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'accountid',
`account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id',
`skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '英雄皮肤id',
`skin_state` int(11) NOT NULL DEFAULT '0' COMMENT '英雄皮肤状态 0=已经购1 = 试用状态',
`get_from` int(11) NOT NULL DEFAULT '0' COMMENT '获得方式 0 = 系统赠送 1 = 金币购买',
@ -89,7 +89,7 @@ CREATE TABLE `t_hero_skin` (
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid_skinid` (`accountid`, `skin_id`)
UNIQUE KEY `account_id_skinid` (`account_id`, `skin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -102,7 +102,7 @@ DROP TABLE IF EXISTS `t_bag`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_bag` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`item_id` int(11) NOT NULL DEFAULT '0' COMMENT '道具id',
`item_num` int(11) NOT NULL DEFAULT '0' COMMENT '数量',
`item_state` int(11) NOT NULL DEFAULT '0' COMMENT '状态0=已经购1 = 试用状态)',
@ -110,8 +110,8 @@ CREATE TABLE `t_bag` (
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `item_uuid` (`accountid`, `item_id`),
KEY `accountid` (`accountid`)
UNIQUE KEY `item_uuid` (`account_id`, `item_id`),
KEY `account_id` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -124,13 +124,13 @@ DROP TABLE IF EXISTS `t_gun_skin`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_gun_skin` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'accountid',
`account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id',
`skin_id` int(11) NOT NULL DEFAULT '0' COMMENT '皮肤ID',
`try_expire_at` int(11) NOT NULL DEFAULT '0' COMMENT '试用截止时间',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid_skin_id` (`accountid`, `skin_id`)
UNIQUE KEY `account_id_skin_id` (`account_id`, `skin_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
@ -143,15 +143,36 @@ DROP TABLE IF EXISTS `t_gun_talent`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_gun_talent` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`accountid` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'accountid',
`account_id` varchar(60) CHARACTER SET utf8 NOT NULL COMMENT 'account_id',
`type_id` int(11) NOT NULL DEFAULT '0' COMMENT '枪类型的id',
`talent_id` int(11) NOT NULL DEFAULT '0' COMMENT '技能ID',
`talent_lv` int(11) NOT NULL DEFAULT '0' COMMENT '技能等级',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `accountid_type_id_talent_id` (`accountid`, `type_id`,`talent_id`)
UNIQUE KEY `account_id_type_id_talent_id` (`account_id`, `type_id`,`talent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `dyndata`
--
DROP TABLE IF EXISTS `dyndata`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `dyndata` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`x` int(11) NOT NULL DEFAULT '0' COMMENT 'x',
`y` int(11) NOT NULL DEFAULT '0' COMMENT 'y',
`val` bigint NOT NULL DEFAULT '0' COMMENT 'val',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',
PRIMARY KEY (`idx`),
UNIQUE KEY `account_id_x_y` (`account_id`, `x`, `y`),
KEY `account_id` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
-- Dump completed on 2015-08-19 18:51:22

View File

@ -17,7 +17,7 @@ class BagController extends BaseAuthedController {
$this->_getSelfMysql(),
't_bag',
array(
'accountid' => $this->_getAccountId()
'account_id' => $this->_getAccountId()
),
function ($row) use(&$itemList) {
array_push($itemList, Bag::toDto($row));

View File

@ -61,7 +61,7 @@ class BaseAuthedController extends BaseController {
't_user',
$fields,
array(
'accountid' => $this->_getAccountId()
'account_id' => $this->_getAccountId()
)
);
if (empty($row)) {
@ -78,7 +78,7 @@ class BaseAuthedController extends BaseController {
($this->_getSelfMysql(),
't_user',
array(
'accountid' => $this->_getAccountId()
'account_id' => $this->_getAccountId()
)
);
if (empty($row)) {
@ -95,7 +95,7 @@ class BaseAuthedController extends BaseController {
($this->_getSelfMysql(),
't_user',
array(
'accountid' => $this->_getAccountId()
'account_id' => $this->_getAccountId()
)
);
return $row ? $row : null;
@ -107,7 +107,7 @@ class BaseAuthedController extends BaseController {
($this->_getSelfMysql(),
'user',
array(
'accountid' => $this->_getAccountId()
'account_id' => $this->_getAccountId()
),
$fieldsKv
);

View File

@ -14,7 +14,7 @@ class EquipController extends BaseAuthedController {
$conn = $this->_getMysql($account_id);
$equip_list = array();
$rows = $conn->execQuery('SELECT * FROM equip WHERE accountid=:account_id;',
$rows = $conn->execQuery('SELECT * FROM equip WHERE account_id=:account_id;',
array(
'account_id' => $account_id,
));
@ -23,9 +23,9 @@ class EquipController extends BaseAuthedController {
//新玩家装备数据
//$id = $addreward->getRealIndexid(12151, $account_id);
// $id = 23001;
// $ret = $conn->execScript('INSERT INTO equip(accountid, id, lv, active_time, sub_time, create_time, modify_time, using_id, exp) ' .
// $ret = $conn->execScript('INSERT INTO equip(account_id, id, lv, active_time, sub_time, create_time, modify_time, using_id, exp) ' .
// ' VALUES(:account_id, :id, 0, :active_time, :sub_time, :create_time, :modify_time, :using_id, 0) ' .
// ' ON DUPLICATE KEY UPDATE accountid=:account_id, id=:id, lv=0, active_time=:active_time, sub_time=:sub_time, modify_time=:modify_time, using_id=:using_id, exp=0;',
// ' ON DUPLICATE KEY UPDATE account_id=:account_id, id=:id, lv=0, active_time=:active_time, sub_time=:sub_time, modify_time=:modify_time, using_id=:using_id, exp=0;',
// array(
// ':account_id' => $account_id,
// ':id' => $id,
@ -55,9 +55,9 @@ class EquipController extends BaseAuthedController {
$time = $row['active_time'] + $row['sub_time'];
if (phpcommon\getNowTime() >= $time && $row['sub_time'] != 0) {
$ret1 = $conn->execScript('UPDATE equip SET active_time=0, sub_time=0, modify_time=:modify_time ' .
' WHERE accountid=:accountid AND id=:id;',
' WHERE account_id=:account_id AND id=:id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
':modify_time' => phpcommon\getNowTime(),
':id' => $row['id'],
));
@ -96,7 +96,7 @@ class EquipController extends BaseAuthedController {
}
$type = $_REQUEST['type'];
$row = $conn->execQueryOne('SELECT * FROM equip WHERE accountid=:account_id AND id=:id;',
$row = $conn->execQueryOne('SELECT * FROM equip WHERE account_id=:account_id AND id=:id;',
array(
':account_id' => $account_id,
':id' => $id
@ -117,7 +117,7 @@ class EquipController extends BaseAuthedController {
//error_log($e['reduce_time']);
$sub_time = $row['sub_time'] - floor($row['sub_time'] * $reduce_time * 0.01);
if ($type == 1) {
$rowUser = $conn->execQueryOne('SELECT rmb_num FROM user WHERE accountid=:account_id;',
$rowUser = $conn->execQueryOne('SELECT rmb_num FROM user WHERE account_id=:account_id;',
array(
':account_id' => $account_id
));
@ -135,9 +135,9 @@ class EquipController extends BaseAuthedController {
$diamond_time = $diamond_list[$row['lv'] - 1][0];
$sub_time = $row['sub_time'] - floor($row['sub_time'] * $diamond_time * 0.01);
$retUser = $conn->execScript('UPDATE user SET rmb_num=:rmb_num, modify_time=:modify_time ' .
' WHERE accountid=:accountid;',
' WHERE account_id=:account_id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
':rmb_num' => $rowUser['rmb_num'] - $diamond_cost,
':modify_time' => phpcommon\getNowTime()
));
@ -154,9 +154,9 @@ class EquipController extends BaseAuthedController {
$flag = 1;
}
$retEquip = $conn->execScript('UPDATE equip SET active_time=:active_time, sub_time=:sub_time, modify_time=:modify_time ' .
' WHERE accountid=:accountid AND id=:id;',
' WHERE account_id=:account_id AND id=:id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
':active_time' => $active_time,
':sub_time' => $sub_time,
':modify_time' => phpcommon\getNowTime(),
@ -183,7 +183,7 @@ class EquipController extends BaseAuthedController {
$account_id = $_REQUEST['account_id'];
$equip_id = $_REQUEST['id'];
$conn = $this->_getMysql($account_id);
$row = $conn->execQueryOne('SELECT * FROM equip WHERE accountid=:account_id AND id=:id;',
$row = $conn->execQueryOne('SELECT * FROM equip WHERE account_id=:account_id AND id=:id;',
array(
':account_id' => $account_id,
':id' => $equip_id
@ -197,9 +197,9 @@ class EquipController extends BaseAuthedController {
}
$ret = $conn->execScript('UPDATE equip SET using_id=:using_id, modify_time=:modify_time ' .
' WHERE accountid=:accountid;',
' WHERE account_id=:account_id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
':using_id' => $equip_id,
':modify_time' => phpcommon\getNowTime(),
));
@ -233,7 +233,7 @@ class EquipController extends BaseAuthedController {
$mul = explode('|', $drop_multiply[$i]);
array_push($arr, $mul);
}
$row = $conn->execQueryOne('SELECT id, lv, exp FROM equip WHERE accountid=:account_id AND id=:id;',
$row = $conn->execQueryOne('SELECT id, lv, exp FROM equip WHERE account_id=:account_id AND id=:id;',
array(
':account_id' => $account_id,
':id' => $equip_id
@ -288,7 +288,7 @@ class EquipController extends BaseAuthedController {
phpcommon\sendError(ERR_USER_BASE + 1, '没有这个道具');
return;
}
$rowuser = $conn->execQueryOne('SELECT coin_num, rmb_num FROM user WHERE accountid=:account_id;',
$rowuser = $conn->execQueryOne('SELECT coin_num, rmb_num FROM user WHERE account_id=:account_id;',
array(
':account_id' => $account_id,
));
@ -309,9 +309,9 @@ class EquipController extends BaseAuthedController {
return;
}
} else if ($it['type'] == 11) {
$rowbag = $conn->execQueryOne('SELECT num FROM bag WHERE accountid=:accountid AND id=:id;',
$rowbag = $conn->execQueryOne('SELECT num FROM bag WHERE account_id=:account_id AND id=:id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
'id' => $ar[0]
));
if ($ar[1] > $rowbag['num']) {
@ -327,9 +327,9 @@ class EquipController extends BaseAuthedController {
}
$ret = $conn->execScript('UPDATE equip SET exp=:exp, modify_time=:modify_time ' .
' WHERE accountid=:accountid AND id=:id;',
' WHERE account_id=:account_id AND id=:id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
':id' => $equip_id,
':modify_time' => phpcommon\getNowTime(),
':exp' => $exp + 1,
@ -355,7 +355,7 @@ class EquipController extends BaseAuthedController {
protected function subCoin($item_id, $item_num, $account_id)
{
$conn = $this->_getMysql($account_id);
$row = $conn->execQueryOne('SELECT coin_num, rmb_num FROM user WHERE accountid=:account_id;',
$row = $conn->execQueryOne('SELECT coin_num, rmb_num FROM user WHERE account_id=:account_id;',
array(
':account_id' => $account_id,
));
@ -375,9 +375,9 @@ class EquipController extends BaseAuthedController {
if ($item_id != 0){
if ($it['type'] == 1) {
$ret = $conn->execScript('UPDATE user SET coin_num=:coin_num, modify_time=:modify_time ' .
' WHERE accountid=:accountid;',
' WHERE account_id=:account_id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
':modify_time' => phpcommon\getNowTime(),
':coin_num' => $row['coin_num'] - $item_num,
));
@ -387,9 +387,9 @@ class EquipController extends BaseAuthedController {
}
} else if ($it['type'] == 3) {
$ret = $conn->execScript('UPDATE user SET rmb_num=:rmb_num, modify_time=:modify_time ' .
' WHERE accountid=:accountid;',
' WHERE account_id=:account_id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
':modify_time' => phpcommon\getNowTime(),
':rmb_num' => $row['rmb_num'] - $item_num,
));
@ -398,15 +398,15 @@ class EquipController extends BaseAuthedController {
return;
}
} else if ($it['type'] == 11) {
$rowbag = $conn->execQueryOne('SELECT num FROM bag WHERE accountid=:accountid AND id=:id;',
$rowbag = $conn->execQueryOne('SELECT num FROM bag WHERE account_id=:account_id AND id=:id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
'id' => $item_id
));
$ret = $conn->execScript('UPDATE bag SET num=:num, modify_time=:modify_time ' .
' WHERE accountid=:accountid AND id=:id;',
' WHERE account_id=:account_id AND id=:id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
':modify_time' => phpcommon\getNowTime(),
':num' => $rowbag['num'] - $item_num,
':id' => $item_id
@ -424,7 +424,7 @@ class EquipController extends BaseAuthedController {
$account_id = $_REQUEST['account_id'];
$equip_id = $_REQUEST['id'];
$conn = $this->_getMysql($account_id);
$row = $conn->execQueryOne('SELECT id, using_id, lv, exp FROM equip WHERE accountid=:account_id AND id=:id;',
$row = $conn->execQueryOne('SELECT id, using_id, lv, exp FROM equip WHERE account_id=:account_id AND id=:id;',
array(
':account_id' => $account_id,
':id' => $equip_id
@ -495,9 +495,9 @@ class EquipController extends BaseAuthedController {
$flag = 1;
}
$ret = $conn->execScript('UPDATE equip SET exp=:exp, lv=:lv, modify_time=:modify_time, active_time=:active_time, sub_time=:sub_time ' .
' WHERE accountid=:accountid AND id=:id;',
' WHERE account_id=:account_id AND id=:id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
':id' => $equip_id,
':modify_time' => phpcommon\getNowTime(),
':exp' => 0,
@ -527,7 +527,7 @@ class EquipController extends BaseAuthedController {
protected function checkcoin($id, $num, $account_id)
{
$conn = $this->_getMysql($account_id);
$row = $conn->execQueryOne('SELECT coin_num, rmb_num FROM user WHERE accountid=:account_id;',
$row = $conn->execQueryOne('SELECT coin_num, rmb_num FROM user WHERE account_id=:account_id;',
array(
':account_id' => $account_id,
));
@ -559,9 +559,9 @@ class EquipController extends BaseAuthedController {
}
} else if ($it['type'] == 11 ||
$it['type'] == 19) {
$rowbag = $conn->execQueryOne('SELECT num FROM bag WHERE accountid=:accountid AND id=:id;',
$rowbag = $conn->execQueryOne('SELECT num FROM bag WHERE account_id=:account_id AND id=:id;',
array(
':accountid' => $account_id,
':account_id' => $account_id,
'id' => $id
));
if ($rowbag['num'] < $num) {
@ -578,7 +578,7 @@ class EquipController extends BaseAuthedController {
$account_id = $_REQUEST['account_id'];
$conn = $this->_getMysql($account_id);
$id = $_REQUEST['id'];
$row = $conn->execQueryOne('SELECT num FROM bag WHERE accountid=:account_id AND id=:id;',
$row = $conn->execQueryOne('SELECT num FROM bag WHERE account_id=:account_id AND id=:id;',
array(
':account_id' => $account_id,
':id' => $id
@ -595,7 +595,7 @@ class EquipController extends BaseAuthedController {
}
$ret = $conn->execScript('UPDATE bag SET num=:num, modify_time=:modify_time ' .
' WHERE accountid=:account_id AND id=:id;',
' WHERE account_id=:account_id AND id=:id;',
array(
':account_id' => $account_id,
':id' => $id,

View File

@ -35,7 +35,7 @@ class FriendController extends BaseAuthedController {
$avatar_url = 18001;
$vip_level = 0;
foreach ($conns as $conn) {
$row = $conn->execQueryOne('SELECT accountid, user_name, avatar_url, game_times, win_times, kill_his, kills, harm_his, harm, integral, modify_time, alive_time, add_HP, head_kuang_id, max_integral, sex FROM user WHERE accountid=:account_id;',
$row = $conn->execQueryOne('SELECT account_id, user_name, avatar_url, game_times, win_times, kill_his, kills, harm_his, harm, integral, modify_time, alive_time, add_HP, head_kuang_id, max_integral, sex FROM user WHERE account_id=:account_id;',
array(
':account_id' => $target_id,
));
@ -43,7 +43,7 @@ class FriendController extends BaseAuthedController {
$flag = 1;
}
$rowbags = $conn->execQuery('SELECT id, color_id FROM bag WHERE accountid=:account_id AND status=0;',
$rowbags = $conn->execQuery('SELECT id, color_id FROM bag WHERE account_id=:account_id AND status=0;',
array(
':account_id' => $target_id,
));
@ -51,11 +51,11 @@ class FriendController extends BaseAuthedController {
$flag = 1;
}
$rowequip = $conn->execQueryOne('SELECT using_id FROM equip WHERE accountid=:account_id;',
$rowequip = $conn->execQueryOne('SELECT using_id FROM equip WHERE account_id=:account_id;',
array(
':account_id' => $target_id,
));
$rowlv = $conn->execQueryOne('SELECT using_id, lv FROM equip WHERE accountid=:account_id AND id=:id;',
$rowlv = $conn->execQueryOne('SELECT using_id, lv FROM equip WHERE account_id=:account_id AND id=:id;',
array(
':account_id' => $target_id,
':id' => $rowequip['using_id']
@ -94,7 +94,7 @@ class FriendController extends BaseAuthedController {
echo json_encode(array(
'errcode' => 0,
'errmsg' => '',
'accountid' => $row['accountid'],
'account_id' => $row['account_id'],
'user_name' => $row['user_name'],
'avatar_url' => $row['avatar_url'],
'game_times' => $row['game_times'],
@ -123,7 +123,7 @@ class FriendController extends BaseAuthedController {
$flag = 0;
$name = '';
foreach ($conns as $conn) {
$row = $conn->execQueryOne('SELECT user_name FROM user WHERE accountid=:account_id;',
$row = $conn->execQueryOne('SELECT user_name FROM user WHERE account_id=:account_id;',
array(
':account_id' => $target_id,
));
@ -149,10 +149,10 @@ class FriendController extends BaseAuthedController {
{
$account_id = $_REQUEST['account_id'];
$conns = $this->getAllMysql();
$accountid = '';
$account_id = '';
$user_name = $_REQUEST['user_name'];
foreach ($conns as $conn) {
$row = $conn->execQueryOne('SELECT accountid FROM user WHERE user_name=:user_name;',
$row = $conn->execQueryOne('SELECT account_id FROM user WHERE user_name=:user_name;',
array(
':user_name' => $user_name,
));
@ -164,7 +164,7 @@ class FriendController extends BaseAuthedController {
$robot_meta = getRobotConfig($robot_meta_cluster, $robot_id);
if ($robot_meta['name'] == $user_name) {
$flag = 1;
$accountid = '6511_2005_robot' . $i;
$account_id = '6511_2005_robot' . $i;
break;
}
}
@ -173,7 +173,7 @@ class FriendController extends BaseAuthedController {
}
} else {
$flag = 1;
$accountid = $row['accountid'];
$account_id = $row['account_id'];
break;
}
}
@ -186,7 +186,7 @@ class FriendController extends BaseAuthedController {
echo json_encode(array(
'errcode' => 0,
'errmsg' => '',
'fri_accountid' => $accountid,
'fri_account_id' => $account_id,
));
}
@ -203,9 +203,9 @@ class FriendController extends BaseAuthedController {
$item_id = metatable\getParameterByName('creator_hair_f');
}
if ($item_id != 0) {
$ret = $conn->execScript('INSERT INTO bag(accountid, id, color_id, status, num, active_time, create_time, modify_time) ' .
$ret = $conn->execScript('INSERT INTO bag(account_id, id, color_id, status, num, active_time, create_time, modify_time) ' .
' VALUES(:account_id, :id, 0, :status, :num, :active_time, :create_time, :modify_time) ' .
' ON DUPLICATE KEY UPDATE accountid=:account_id, id=:id, color_id=0, status=:status, num=:num, active_time=:active_time, modify_time=:modify_time;',
' ON DUPLICATE KEY UPDATE account_id=:account_id, id=:id, color_id=0, status=:status, num=:num, active_time=:active_time, modify_time=:modify_time;',
array(
':account_id' => $account_id,
':id' => $item_id,
@ -235,12 +235,12 @@ class FriendController extends BaseAuthedController {
{
$conn = $this->_getMysql($account_id);
$ret = $conn->execScript('UPDATE user SET user_name=:user_name, avatar_url=:avatar_url, modify_time=:modify_time, create_user=1, sex=:sex ' .
' WHERE accountid=:accountid;',
' WHERE account_id=:account_id;',
array(
':user_name' => $user_name,
':avatar_url' => $avatar_url,
':modify_time' => phpcommon\getNowTime(),
':accountid' => $account_id,
':account_id' => $account_id,
':sex' => $sex,
));
if (!$ret) {
@ -272,7 +272,7 @@ class FriendController extends BaseAuthedController {
$conns = $this->getAllMysql();
$user_name = $_REQUEST['user_name'];
foreach ($conns as $conn) {
$row = $conn->execQueryOne('SELECT accountid FROM user WHERE accountid!=:account_id AND user_name=:user_name;',
$row = $conn->execQueryOne('SELECT account_id FROM user WHERE account_id!=:account_id AND user_name=:user_name;',
array(
':account_id' => $account_id,
':user_name' => $user_name,

View File

@ -20,7 +20,7 @@ class GunController extends BaseAuthedController {
$this->_getSelfMysql(),
't_gun_skin',
array(
'accountid' => $this->_getAccountId()
'account_id' => $this->_getAccountId()
),
function ($row) use(&$skinList) {
array_push($skinList, GunSkin::toDto($row));
@ -38,7 +38,7 @@ class GunController extends BaseAuthedController {
$this->_getSelfMysql(),
't_gun_talent',
array(
'accountid' => $this->_getAccountId()
'account_id' => $this->_getAccountId()
),
function ($row) use(&$talentList) {
array_push($talentList, GunTalent::toDto($row));

View File

@ -20,7 +20,7 @@ class HeroController extends BaseAuthedController {
$this->_getSelfMysql(),
't_hero',
array(
'accountid' => $this->_getAccountId()
'account_id' => $this->_getAccountId()
),
function ($row) use(&$heroList) {
array_push($heroList, Hero::toDto($row));
@ -38,7 +38,7 @@ class HeroController extends BaseAuthedController {
$this->_getSelfMysql(),
't_hero_skin',
array(
'accountid' => $this->_getAccountId()
'account_id' => $this->_getAccountId()
),
function ($row) use(&$skinList) {
array_push($skinList, HeroSkin::toDto($row));

View File

@ -22,9 +22,9 @@ class RankController extends BaseAuthedController {
$myavatar_url = '';
//个人信息
$row = $conn->execQueryOne('SELECT user_name, avatar_url, kills, alive_time, harm, win_times, game_times, integral FROM user ' .
' WHERE accountid=:accountid;',
' WHERE account_id=:account_id;',
array(
':accountid' => $account_id
':account_id' => $account_id
));
if ($row) {
$seaPoint_meta_table = require('../res/seasomPoint@seasomPoint.php');
@ -91,7 +91,7 @@ class RankController extends BaseAuthedController {
if ($win_db[$i][0] == $account_id) {
$win_rank = $i + 1;
}
$row = $conn->execQueryOne('SELECT head_kuang_id, sex FROM user WHERE accountid=:account_id;',
$row = $conn->execQueryOne('SELECT head_kuang_id, sex FROM user WHERE account_id=:account_id;',
array(
':account_id' => $win_db[$i][0],
));
@ -174,7 +174,7 @@ class RankController extends BaseAuthedController {
break;
}
}
$row = $conn->execQueryOne('SELECT head_kuang_id, sex FROM user WHERE accountid=:account_id;',
$row = $conn->execQueryOne('SELECT head_kuang_id, sex FROM user WHERE account_id=:account_id;',
array(
':account_id' => $integral_db[$i][0],
));
@ -260,14 +260,14 @@ class RankController extends BaseAuthedController {
$killResultArr = array();
$rankPointArr = array();
//获得自己的击杀排行榜
$sqlStr = "SELECT accountid,user_name,hi_id,head_kuang_id,kills,win_times FROM user WHERE accountid=:accountid";
$row = $conn->execQuery($sqlStr,array(':accountid' => $account_id));
$sqlStr = "SELECT account_id,user_name,hi_id,head_kuang_id,kills,win_times FROM user WHERE account_id=:account_id";
$row = $conn->execQuery($sqlStr,array(':account_id' => $account_id));
if($row)
{
array_push($killResultArr,$row[0]);
}
//击杀排行榜
$sqlStr = "SELECT accountid,user_name,hi_id,head_kuang_id,kills,win_times FROM user order by win_times desc limit 50";
$sqlStr = "SELECT account_id,user_name,hi_id,head_kuang_id,kills,win_times FROM user order by win_times desc limit 50";
$row = $conn->execQuery($sqlStr);
if($row) {
$len = count($row);
@ -277,14 +277,14 @@ class RankController extends BaseAuthedController {
}
}
//获得自己的排位积分
$sqlStr = "SELECT accountid,user_name,hi_id,head_kuang_id,integral FROM user WHERE accountid=:accountid";
$row = $conn->execQuery($sqlStr,array(':accountid' => $account_id));
$sqlStr = "SELECT account_id,user_name,hi_id,head_kuang_id,integral FROM user WHERE account_id=:account_id";
$row = $conn->execQuery($sqlStr,array(':account_id' => $account_id));
if($row)
{
array_push($rankPointArr,$row[0]);
}
//积分排行榜
$sqlStr = "SELECT accountid,user_name,hi_id,head_kuang_id,integral FROM user order by integral desc limit 50";
$sqlStr = "SELECT account_id,user_name,hi_id,head_kuang_id,integral FROM user order by integral desc limit 50";
$row = $conn->execQuery($sqlStr);
if($row) {
$len = count($row);

View File

@ -46,9 +46,9 @@ class TeamController extends BaseAuthedController {
}
$account_id = $_REQUEST['account_id'];
$conn = $this->_getMysql($account_id);
$row = $conn->execQueryOne('SELECT game_times, win_times, kills, create_time FROM user WHERE accountid=:accountid;',
$row = $conn->execQueryOne('SELECT game_times, win_times, kills, create_time FROM user WHERE account_id=:account_id;',
array(
'accountid' => $account_id,
'account_id' => $account_id,
));
$team_db = array(
@ -95,7 +95,7 @@ class TeamController extends BaseAuthedController {
$r = $this->_getRedis($team_uuid);
$accountid = $_REQUEST['account_id'];
$account_id = $_REQUEST['account_id'];
$sessionid = $_REQUEST['session_id'];
$user_db_str = $r->get(TEAMID_KEY . $team_uuid);
if (empty($user_db_str)) {
@ -122,7 +122,7 @@ class TeamController extends BaseAuthedController {
$r = $this->_getRedis($team_uuid);
$accountid = $_REQUEST['account_id'];
$account_id = $_REQUEST['account_id'];
$sessionid = $_REQUEST['session_id'];
$user_db_str = $r->get(TEAMID_KEY . $team_uuid);
if (empty($user_db_str)) {
@ -171,7 +171,7 @@ class TeamController extends BaseAuthedController {
$r = $this->_getRedis($team_uuid);
$accountid = $_REQUEST['account_id'];
$account_id = $_REQUEST['account_id'];
$sessionid = $_REQUEST['session_id'];
$user_db_str = $r->get(TEAMID_KEY . $team_uuid);
if (empty($user_db_str)) {
@ -350,11 +350,11 @@ class TeamController extends BaseAuthedController {
if (isset($_REQUEST['hiFrameID'])) {
$hiFrameID = $_REQUEST['hiFrameID'];
}
$accountid = $_REQUEST['account_id'];
$conn = $this->_getMysql($accountid);
$row = $conn->execQueryOne('SELECT game_times, win_times, kills, create_time FROM user WHERE accountid=:accountid;',
$account_id = $_REQUEST['account_id'];
$conn = $this->_getMysql($account_id);
$row = $conn->execQueryOne('SELECT game_times, win_times, kills, create_time FROM user WHERE account_id=:account_id;',
array(
'accountid' => $accountid,
'account_id' => $account_id,
));
array_push ($user_db['member_list'], array(
'idx' => $member_num + 1,

View File

@ -50,12 +50,12 @@ class UserController extends BaseAuthedController {
($this->_getSelfMysql(),
't_user',
array(
'accountid' => $this->_getAccountId()
'account_id' => $this->_getAccountId()
),
array(
),
array(
'accountid' => $this->_getAccountId(),
'account_id' => $this->_getAccountId(),
'name' => $userName,
#'avatar_url' => $avatar_url,
'gold' => 10000,

View File

@ -18,7 +18,7 @@ class Bag extends BaseModel {
myself()->_getSelfMysql(),
't_bag',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'item_id' => $itemId,
)
);
@ -54,7 +54,7 @@ class Bag extends BaseModel {
(myself()->_getSelfMysql(),
't_bag',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'item_id' => $itemId
),
array(
@ -63,7 +63,7 @@ class Bag extends BaseModel {
'item_state' => self::GETED_STATE,
),
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'item_id' => $itemId,
'item_num' => $itemNum,
'item_state' => self::GETED_STATE,
@ -87,13 +87,13 @@ class Bag extends BaseModel {
(myself()->_getSelfMysql(),
't_bag',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'item_id' => $itemId
),
array(
),
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'item_id' => $itemId,
'item_num' => $itemNum,
'item_state' => self::TRY_USING_STATE,
@ -110,7 +110,7 @@ class Bag extends BaseModel {
(myself()->_getSelfMysql(),
't_bag',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'item_id' => $itemId,
'item_state' => self::GETED_STATE,
),

View File

@ -16,7 +16,7 @@ class GunSkin extends BaseModel {
myself()->_getSelfMysql(),
't_gun_skin',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'skin_id' => $skinId
)
);

View File

@ -13,7 +13,7 @@ class GunTalent extends BaseModel {
myself()->_getSelfMysql(),
't_gun_talent',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'type_id' => $typeId,
'type_id' => $row['type_id'],
)

View File

@ -16,7 +16,7 @@ class Hero extends BaseModel {
myself()->_getSelfMysql(),
't_hero',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'hero_id' => $heroId,
)
);
@ -43,13 +43,13 @@ class Hero extends BaseModel {
myself()->_getSelfMysql(),
't_hero',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'hero_id' => $heroMeta['id']
),
array(
),
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'hero_id' => $heroMeta['id'],
'hero_lv' => 1,
'skin_id' => $defSkin,
@ -72,7 +72,7 @@ class Hero extends BaseModel {
myself()->_getSelfMysql(),
't_hero',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'hero_id' => $heroMeta['id']
),
array(
@ -92,7 +92,7 @@ class Hero extends BaseModel {
myself()->_getSelfMysql(),
't_hero',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'hero_id' => $heroId
),
array(

View File

@ -18,7 +18,7 @@ class HeroSkin extends BaseModel {
myself()->_getSelfMysql(),
't_hero_skin',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'skin_id' => $skinId
)
);
@ -40,7 +40,7 @@ class HeroSkin extends BaseModel {
myself()->_getSelfMysql(),
't_hero_skin',
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'skin_id' => $skinId
),
array(
@ -48,7 +48,7 @@ class HeroSkin extends BaseModel {
'modifytime' => myself()->_getNowTime()
),
array(
'accountid' => myself()->_getAccountId(),
'account_id' => myself()->_getAccountId(),
'skin_id' => $skinId,
'skin_state' => 0,
'get_from' => 0,