From 54483965aff9706dd7d1de0577f58f4934c90d57 Mon Sep 17 00:00:00 2001 From: hujiabin Date: Thu, 27 Oct 2022 11:26:26 +0800 Subject: [PATCH] 1 --- doc/Battle.py | 2 +- doc/_common.py | 4 ++++ sql/gamedb.sql | 2 ++ webapp/models/User.php | 6 +++++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/Battle.py b/doc/Battle.py index c46cbebe..c0815648 100644 --- a/doc/Battle.py +++ b/doc/Battle.py @@ -27,7 +27,7 @@ class Battle(object): 'url': 'webapp/index.php?c=Battle&a=getBattleHistory', 'params': [ _common.ReqHead(), - ['mode', '', '0:pvp 1:排位 2:pve'] + ['mode', '', ' 1:pvp 2:pve'] ], 'response': [ _common.RspHead(), diff --git a/doc/_common.py b/doc/_common.py index 9dbe6d30..6e3296de 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -146,6 +146,8 @@ class UserInfo(object): ['!hero_list', [0], '拥有的立绘背景列表'], ['!head_frame_list', [0], '拥有的头像框列表'], ['is_gain_item', 0, '0 为获取,1 以获取'], + ['labor_id', 0, '工会id'], + ['labor_name', '', '工会名称'], ] class UserSimple(object): @@ -197,6 +199,8 @@ class UserDetailInfo(object): ['current_rank_score', 0, '当前赛季排位分'], ['history_best_rank_score', 0, '历史最高赛季排位分'], ['like_count', 0, '点赞次数'], + ['labor_id', 0, '工会id'], + ['labor_name', '', '工会名称'], ['!history_seasons', [UserHisSeason()], '历史打过的赛季列表'], ] diff --git a/sql/gamedb.sql b/sql/gamedb.sql index e7e4737d..cb748cdc 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -62,6 +62,8 @@ CREATE TABLE `t_user` ( `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', `last_login_time` int(11) NOT NULL DEFAULT '0' COMMENT '上次登录时间', `is_gain_item` int(11) NOT NULL DEFAULT '0' COMMENT '是否获取免费item道具', + `labor_id` int(11) NOT NULL DEFAULT '0' COMMENT '工会id', + `labor_name` varchar(60) NOT NULL DEFAULT '' COMMENT '工会名称', PRIMARY KEY (`idx`), UNIQUE KEY `account_id` (`account_id`), KEY `channel` (`channel`) diff --git a/webapp/models/User.php b/webapp/models/User.php index 359e0c37..dd16a2ab 100644 --- a/webapp/models/User.php +++ b/webapp/models/User.php @@ -52,6 +52,8 @@ class User extends BaseModel { 'hero_list' => self::exportHeadList($row)['hero_list'], 'head_frame_list' => emptyReplace(json_decode($row['head_frame_list'], true), array()), 'is_gain_item' => $row['is_gain_item'], + 'labor_id' => $row['labor_id'], + 'labor_name' => $row['labor_name'], ); } @@ -85,7 +87,9 @@ class User extends BaseModel { 'like_count' => $row['like_count'], 'head_frame_list' => emptyReplace(json_decode($row['head_frame_list'], true), array()), 'is_gain_item' => $row['is_gain_item'], - 'is_leader' => 0 + 'is_leader' => 0, + 'labor_id' => $row['labor_id'], + 'labor_name' => $row['labor_name'], ); }