1
This commit is contained in:
parent
bfb9d35d6a
commit
7967e2eed6
@ -192,6 +192,8 @@ class UserDetailInfo(object):
|
|||||||
['hero_id', 0, '当前使用的英雄ID'],
|
['hero_id', 0, '当前使用的英雄ID'],
|
||||||
['current_rank', 0, '当前段位'],
|
['current_rank', 0, '当前段位'],
|
||||||
['history_best_rank', 0, '历史最高段位'],
|
['history_best_rank', 0, '历史最高段位'],
|
||||||
|
['current_rank_score', 0, '当前赛季排位分'],
|
||||||
|
['history_best_rank_score', 0, '历史最高赛季排位分'],
|
||||||
['like_count', 0, '点赞次数'],
|
['like_count', 0, '点赞次数'],
|
||||||
['!history_seasons', [UserHisSeason()], '历史打过的赛季列表'],
|
['!history_seasons', [UserHisSeason()], '历史打过的赛季列表'],
|
||||||
]
|
]
|
||||||
|
@ -39,6 +39,7 @@ CREATE TABLE `t_user` (
|
|||||||
`rank` int(11) NOT NULL DEFAULT '0' COMMENT '段位',
|
`rank` int(11) NOT NULL DEFAULT '0' COMMENT '段位',
|
||||||
`history_best_rank` int(11) NOT NULL DEFAULT '0' COMMENT '历史最高段位',
|
`history_best_rank` int(11) NOT NULL DEFAULT '0' COMMENT '历史最高段位',
|
||||||
`score` int(11) NOT NULL DEFAULT '0' COMMENT '积分',
|
`score` int(11) NOT NULL DEFAULT '0' COMMENT '积分',
|
||||||
|
`history_best_score` int(11) NOT NULL DEFAULT '0' COMMENT '历史最高积分',
|
||||||
`gold` bigint NOT NULL DEFAULT '0' COMMENT '金币',
|
`gold` bigint NOT NULL DEFAULT '0' COMMENT '金币',
|
||||||
`diamond` bigint NOT NULL DEFAULT '0' COMMENT '钻石',
|
`diamond` bigint NOT NULL DEFAULT '0' COMMENT '钻石',
|
||||||
`hero_id` int(11) NOT NULL DEFAULT '0' COMMENT '当前上阵英雄id',
|
`hero_id` int(11) NOT NULL DEFAULT '0' COMMENT '当前上阵英雄id',
|
||||||
|
@ -212,6 +212,7 @@ class UserController extends BaseAuthedController {
|
|||||||
'rank' => $initRankMeta ? $initRankMeta['rank'] : 1,
|
'rank' => $initRankMeta ? $initRankMeta['rank'] : 1,
|
||||||
'history_best_rank' => $initRankMeta ? $initRankMeta['rank'] : 1,
|
'history_best_rank' => $initRankMeta ? $initRankMeta['rank'] : 1,
|
||||||
'score' => $initRankMeta ? $initRankMeta['min_score'] : 0,
|
'score' => $initRankMeta ? $initRankMeta['min_score'] : 0,
|
||||||
|
'history_best_score' => $initRankMeta ? $initRankMeta['min_score'] : 0,
|
||||||
'head_id' => $headId,
|
'head_id' => $headId,
|
||||||
'hero_id' => $heroId,
|
'hero_id' => $heroId,
|
||||||
'last_season_id' => $currSeasonMeta ? $currSeasonMeta['id'] : 0,
|
'last_season_id' => $currSeasonMeta ? $currSeasonMeta['id'] : 0,
|
||||||
@ -472,6 +473,8 @@ class UserController extends BaseAuthedController {
|
|||||||
}
|
}
|
||||||
$userDto = User::info($userDb);
|
$userDto = User::info($userDb);
|
||||||
$userDto['current_rank'] = $userDb['rank'];
|
$userDto['current_rank'] = $userDb['rank'];
|
||||||
|
$userDto['current_rank_score'] = $userDb['score'];
|
||||||
|
$userDto['history_best_rank_score'] = $userDb['history_best_score'];
|
||||||
$userDto['history_seasons'] = array();
|
$userDto['history_seasons'] = array();
|
||||||
$seasonDbs = Season::getHistorySeasons($targetId);
|
$seasonDbs = Season::getHistorySeasons($targetId);
|
||||||
foreach ($seasonDbs as $seasonDb) {
|
foreach ($seasonDbs as $seasonDb) {
|
||||||
|
@ -38,6 +38,7 @@ class User extends BaseModel {
|
|||||||
'rank' => $row['rank'],
|
'rank' => $row['rank'],
|
||||||
'history_best_rank' => $row['history_best_rank'],
|
'history_best_rank' => $row['history_best_rank'],
|
||||||
'score' => $row['score'],
|
'score' => $row['score'],
|
||||||
|
'history_best_score' => $row['history_best_score'],
|
||||||
'gold' => $row['gold'],
|
'gold' => $row['gold'],
|
||||||
'diamond' => $row['diamond'],
|
'diamond' => $row['diamond'],
|
||||||
'hero_id' => $row['hero_id'],
|
'hero_id' => $row['hero_id'],
|
||||||
@ -66,6 +67,7 @@ class User extends BaseModel {
|
|||||||
'rank' => $row['rank'],
|
'rank' => $row['rank'],
|
||||||
'history_best_rank' => $row['history_best_rank'],
|
'history_best_rank' => $row['history_best_rank'],
|
||||||
'score' => $row['score'],
|
'score' => $row['score'],
|
||||||
|
'history_best_score' => $row['history_best_score'],
|
||||||
'gold' => $row['gold'],
|
'gold' => $row['gold'],
|
||||||
'diamond' => $row['diamond'],
|
'diamond' => $row['diamond'],
|
||||||
'hero_id' => $row['hero_id'],
|
'hero_id' => $row['hero_id'],
|
||||||
|
@ -335,6 +335,7 @@ class BattleDataService extends BaseService {
|
|||||||
'rank' => $newRank,
|
'rank' => $newRank,
|
||||||
'score' => $newScore,
|
'score' => $newScore,
|
||||||
'history_best_rank' => max($userInfo['rank'], $newRank),
|
'history_best_rank' => max($userInfo['rank'], $newRank),
|
||||||
|
'history_best_score' => max($userInfo['score'], $newScore),
|
||||||
'score_modifytime' => myself()->_getNowTime(),
|
'score_modifytime' => myself()->_getNowTime(),
|
||||||
'best_rank_modifytime' => $newRank > $userInfo['rank'] ?
|
'best_rank_modifytime' => $newRank > $userInfo['rank'] ?
|
||||||
myself()->_getNowTime() : $userInfo['best_rank_modifytime'],
|
myself()->_getNowTime() : $userInfo['best_rank_modifytime'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user