This commit is contained in:
aozhiwei 2021-12-02 13:27:17 +08:00
parent 945937c006
commit 46f08b04ae
2 changed files with 67 additions and 2 deletions

View File

@ -28,12 +28,13 @@ DROP TABLE IF EXISTS `t_user`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_user` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)',
`name` tinyblob COMMENT '用户名字',
`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',
`head_frame` int(11) NOT NULL DEFAULT '0' COMMENT '头像框id',
`level` int(11) NOT NULL DEFAULT '0' COMMENT '等级',
`rank` int(11) NOT NULL DEFAULT '0' COMMENT '段位',
`exp` int(11) NOT NULL DEFAULT '0' COMMENT '经验',
`gold` int(11) NOT NULL DEFAULT '0' COMMENT '金币',
`diamond` int(11) NOT NULL DEFAULT '0' COMMENT '钻石',
@ -217,4 +218,28 @@ CREATE TABLE `t_mission` (
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `t_season`
--
DROP TABLE IF EXISTS `t_season`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_season` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id',
`season_id` int(11) NOT NULL DEFAULT '0' COMMENT '赛季id',
`card_lv` int(11) NOT NULL DEFAULT '0' COMMENT '赛季手册等级',
`total_times` int(11) NOT NULL DEFAULT '0' COMMENT '赛季场次总数',
`win_times` int(11) NOT NULL DEFAULT '0' COMMENT '赛季胜利场次',
`total_score` int(11) NOT NULL DEFAULT '0' COMMENT '赛季积分',
`max_score` 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`),
KEY `account_id` (`account_id`),
UNIQUE KEY `account_id_season_id` (`account_id`, `season_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

@ -295,4 +295,44 @@ class BaseAuthedController extends BaseController {
DynData::decV($x, $y, $decVal);
}
public function _getDailyV($x, $y, $defVal = 0)
{
return DynData::getV($x, $y, $defVal);
}
public function _setDailyV($x, $y, $val)
{
DynData::setV($x, $y, $val);
}
public function _incDailyV($x, $y, $incVal)
{
DynData::incV($x, $y, $incVal);
}
public function _decDailyV($x, $y, $decVal)
{
DynData::decV($x, $y, $decVal);
}
public function _getWeeklyV($x, $y, $defVal = 0)
{
return DynData::getV($x, $y, $defVal);
}
public function _setWeeklyV($x, $y, $val)
{
DynData::setV($x, $y, $val);
}
public function _incWeeklyV($x, $y, $incVal)
{
DynData::incV($x, $y, $incVal);
}
public function _decWeeklyV($x, $y, $decVal)
{
DynData::decV($x, $y, $decVal);
}
}