This commit is contained in:
aozhiwei 2022-09-14 14:59:34 +08:00
parent 6cad7e6809
commit 2b75fda649
6 changed files with 93 additions and 4 deletions

38
doc/History.py Normal file
View File

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
import _common
class History(object):
def __init__(self):
self.apis = [
{
'name': 'queryHistoryBattle',
'desc': '查询历史战绩',
'group': 'History',
'url': 'webapp/index.php?c=Battle&a=queryHistoryBattle',
'params': [
_common.ReqHead(),
['last_idx', '', '回传last_idx, 第一次打开传空'],
],
'response': [
_common.RspHead(),
['!rows', [_common.HisBattle()], '历史战绩'],
['page', _common.Page(), '分页信息']
]
},
{
'name': 'getBattleReport',
'desc': '获取战报信息',
'group': 'History',
'url': 'webapp/index.php?c=Battle&a=getBattleReport',
'params': [
_common.ReqHead(),
['battle_uuid', '', '战斗唯一id'],
],
'response': [
_common.RspHead(),
['battle_result', _common.BattleReport(), '战斗结算信息']
]
},
]

View File

@ -111,4 +111,17 @@ class User(object):
['info',_common.UserDetailInfo(), '用户信息(详细)'],
]
},
{
'name': 'like',
'desc': '点赞',
'group': 'User',
'url': 'webapp/index.php?c=User&a=like',
'params': [
_common.ReqHead(),
['target_id', '', '对方的account_id']
],
'response': [
_common.RspHead(),
]
},
]

View File

@ -63,6 +63,7 @@ class Page(object):
def __init__(self):
self.fields = [
['last_idx', '', '回传信息'],
['total', 0, '总记录数'],
['count', 0, '当前记录数'],
['per_page', 0, '每页多少条记录'],
@ -74,6 +75,7 @@ class Gun(object):
def __init__(self):
self.fields = [
['token_id', '', 'token id'],
['gun_uniid', 0, '枪唯一id'],
['gun_id', 0, '枪id'],
['state', 0, '0已购买 1体验中'],
@ -183,6 +185,7 @@ class UserDetailInfo(object):
['hero_id', 0, '当前使用的英雄ID'],
['current_rank', 0, '当前段位'],
['history_best_rank', 0, '历史最高段位'],
['like_count', 0, '点赞次数'],
['!history_seasons', [UserHisSeason()], '历史打过的赛季列表'],
]
@ -210,6 +213,7 @@ class Hero(object):
def __init__(self):
self.fields = [
['token_id', '', 'token id'],
['hero_uniid', 0, '英雄唯一id'],
['hero_id', 0, '英雄id'],
['hero_lv', 0, '英雄等级'],
@ -728,7 +732,7 @@ class Cost(object):
]
class Fragment(object):
class Fragment(object):
def __init__(self):
self.fields = [
@ -739,4 +743,34 @@ class Fragment(object):
['parts', '', '碎片部位 0:特殊碎片的部位 1-8:普通部位'],
['createtime', 0, '创建时间'],
['modifytime', 0, '修改时间'],
]
]
class HisBattle(object):
def __init__(self):
self.fields = [
['battle_uuid', '', '本次比赛唯一id'],
['match_mode', 0, '比赛模式 1:匹配赛 2:排位赛 3: pve'],
['team_mode', 0, '组队模式 1:单人 2::多人'],
['result', '', '比赛结果 当pve模式时: 1:通关 2:通关失败 其他模式:排名'],
['kills', '', '击杀数'],
['hero_id', '', '英雄id'],
['weapon1_id', '', '武器1 id'],
['weapon2_id', '', '武器2 id'],
['level_class', 0, '段位'],
['score', 0, '段位-积分'],
['score_change', 0, '段位-积分变更'],
['pve_score', 0, 'pve积分 pve模式'],
['map_id', 0, '地图id'],
['pve_instance_id', 0, '副本id'],
['end_time', 0, '战斗时间 utc时间 客户端自己处理时区问题'],
]
class BattleReport(object):
def __init__(self):
self.fields = [
['battle_uuid', '', '本次比赛唯一id'],
['match_mode', 0, '比赛模式 1:匹配赛 2:排位赛 3: pve'],
['team_mode', 0, '组队模式 1:单人 2::多人'],
]

View File

@ -49,6 +49,7 @@ CREATE TABLE `t_user` (
`activatetime` int(11) NOT NULL DEFAULT '0' COMMENT '激活时间',
`already_guide` int(11) NOT NULL DEFAULT '0' COMMENT '已引导',
`pve_instance_id` int(11) NOT NULL DEFAULT '0' COMMENT '已过pve副本id',
`like_count` int(11) NOT NULL DEFAULT '0' COMMENT '被点赞次数',
`head_list` mediumblob COMMENT '拥有的头像列表',
`head_frame_list` mediumblob COMMENT '拥有的头像框列表',
`consume_gold` bigint NOT NULL DEFAULT '0' COMMENT '消费金币数',
@ -595,4 +596,4 @@ CREATE TABLE `t_nft_active` (
) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
-- Dump completed on 2015-08-19 18:51:22
-- Dump completed on 2015-08-19 18:51:22

View File

@ -44,6 +44,7 @@ class User extends BaseModel {
'first_fight' => $row['first_fight'],
'already_guide' => $row['already_guide'],
'pve_instance_id' => $row['pve_instance_id'],
'like_count' => $row['like_count'],
'head_list' => self::getHeadList($row),
'head_frame_list' => emptyReplace(json_decode($row['head_frame_list'], true), array()),
);
@ -72,6 +73,7 @@ class User extends BaseModel {
'already_guide' => $row['already_guide'],
'head_list' => self::getHeadList($row),
'pve_instance_id' => $row['pve_instance_id'],
'like_count' => $row['like_count'],
'head_frame_list' => emptyReplace(json_decode($row['head_frame_list'], true), array()),
);
}
@ -93,6 +95,7 @@ class User extends BaseModel {
'diamond' => $row['diamond'],
'hero_id' => $row['hero_id'],
'pve_instance_id' => $row['pve_instance_id'],
'like_count' => $row['like_count'],
'first_fight' => $row['first_fight'],
);
}

View File

@ -632,7 +632,7 @@ class MissionService extends BaseService {
$missionDto['state'] = 2;
}
} else {
$missionDto['state'] = 2;
$missionDto['state'] = 1;
}
$missionDto['objects'] = $mission['objects'];
$missionDto['ceg_num'] = $this->calcCegPreview($mission['objects']);