diff --git a/doc/Ranking.py b/doc/Ranking.py index 79e6350a..b68aef0f 100644 --- a/doc/Ranking.py +++ b/doc/Ranking.py @@ -13,7 +13,7 @@ class Ranking(object): 'url': 'webapp/index.php?c=Ranking&a=rankingList', 'params': [ _common.ReqHead(), - ['type', 0, '排行榜类型 1:积分榜'] + ['type', 0, '排行榜类型 1:积分榜 10:战斗时间'] ], 'response': [ _common.RspHead(), diff --git a/doc/User.py b/doc/User.py index 3d010f16..c0456727 100644 --- a/doc/User.py +++ b/doc/User.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - import _common class User(object): diff --git a/doc/_common.py b/doc/_common.py index bab3f904..4e8685bf 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -109,6 +109,7 @@ class UserInfo(object): def __init__(self): self.fields = [ ['activated', 0, '是否已激活'], + ['rename_count', 0, '改名次数'], ['account_id', '', '账号id'], ['name', '', '用户名字'], ['head_id', 0, '头像id'], diff --git a/sql/gamedb.sql b/sql/gamedb.sql index 0ed7a37f..f7693359 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -44,6 +44,7 @@ CREATE TABLE `t_user` ( `first_fight` int(11) NOT NULL DEFAULT '0' COMMENT '是否首战', `last_season_id` int(11) NOT NULL DEFAULT '0' COMMENT '最后一次赛季id', `activated` int(11) NOT NULL DEFAULT '0' COMMENT '是否已激活', + `rename_count` int(11) NOT NULL DEFAULT '0' COMMENT '改名次数', `activatetime` int(11) NOT NULL DEFAULT '0' COMMENT '激活时间', `already_guide` int(11) NOT NULL DEFAULT '0' COMMENT '已引导', `head_list` mediumblob COMMENT '拥有的头像列表', diff --git a/webapp/controller/BagController.class.php b/webapp/controller/BagController.class.php index 5f009d16..6595b950 100644 --- a/webapp/controller/BagController.class.php +++ b/webapp/controller/BagController.class.php @@ -193,7 +193,10 @@ class BagController extends BaseAuthedController { return; } $this->_updateUserInfo(array( - 'name' => $name + 'name' => $name, + 'rename_count' => function () { + return 'rename_count + 1'; + } )); } diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index d9e9fb49..2c843c56 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -226,7 +226,10 @@ class UserController extends BaseAuthedController { 'sex' => $sex, 'head_id' => $headId, 'head_frame' => $headFrame, - 'activated' => 1 + 'activated' => 1, + 'rename_count' => function () { + return 'rename_count + 1'; + } )); Hero::addTryHero($heroMeta, $heroCfg[1]); $propertyChgService = new services\PropertyChgService(); diff --git a/webapp/models/User.php b/webapp/models/User.php index 60c610bf..dc706132 100644 --- a/webapp/models/User.php +++ b/webapp/models/User.php @@ -25,6 +25,7 @@ class User extends BaseModel { { return array( 'activated' => $row['activated'], + 'rename_count' => $row['rename_count'], 'account_id' => $row['account_id'], 'name' => $row['name'], 'sex' => $row['sex'], @@ -50,6 +51,7 @@ class User extends BaseModel { { return array( 'activated' => $row['activated'], + 'rename_count' => $row['rename_count'], 'account_id' => $row['account_id'], 'name' => $row['name'], 'sex' => $row['sex'],