From 850364c64d729cbe2fa5fd678088fd173f26a028 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 16 Aug 2024 11:44:51 +0800 Subject: [PATCH 1/6] 1 --- doc/AAMarket.py | 33 +++++++++++++++++++++++++++++++++ doc/_common.py | 12 +++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/doc/AAMarket.py b/doc/AAMarket.py index d329f2d0..d0e0a2b0 100644 --- a/doc/AAMarket.py +++ b/doc/AAMarket.py @@ -372,6 +372,36 @@ class AAMarket(object): ], '任务列表'], ] }, + { + 'method': 'GET', + 'name': '/api/activity/cec/contribution/:account_address', + 'desc': 'cec贡献点活动', + 'group': '!AAMarket', + 'url': '/api/activity/cec/contribution/:account_address', + 'params': [ + ], + 'response': [ + _common.RspHead(), + ['info', _common.CecContributionActivity(), 'cec贡献点活动'], + ] + }, + { + 'method': 'GET', + 'name': '/api/activity/contribution/history/:account_address', + 'desc': '贡献点活动-获得历史', + 'group': '!AAMarket', + 'url': '/api/activity/contribution/history/:account_address', + 'params': [ + ], + 'response': [ + _common.RspHead(), + ['!rows', [ + ['type', 0, '1:质押 2:游戏内消费金币'], + ['give_time', 0, '获得时间'], + ['contribution_point', 0, '贡献点'], + ], '数据'], + ] + }, { 'method': 'GET', 'name': '/api/chain/txhash/:net_id/:txhash', @@ -431,6 +461,7 @@ class AAMarket(object): ], 'response': [ _common.RspHead(), + ['contribution', 0, '通过充值获得的贡献点数'], ['!rows', [_common.RechargeGoods()], '数据'], ] }, @@ -449,6 +480,7 @@ class AAMarket(object): ['goods_id', '', '商品id'], ['goods_num', '', '商品数量'], ['account_address', '', '钱包地址(一般为小狐狸)'], + ['currency_address', '', '货币地址'], ], 'response': [ _common.RspHead(), @@ -473,6 +505,7 @@ class AAMarket(object): ['goods_id', '', '商品id'], ['goods_num', '', '商品数量'], ['account_address', '', '钱包地址(一般为小狐狸)'], + ['currency_address', '', '货币地址'], ['email', '', 'email'], ], 'response': [ diff --git a/doc/_common.py b/doc/_common.py index 5036a285..e112a834 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1853,7 +1853,7 @@ class RechargeGoods(object): ['first_present_diamond', 0, '首冲赠送钻石'], ['is_first_recharge', 0, '是否第一次购买该商品'], ['max_buy_times', 0, '充值次数上限'], - ['currencys', [[ + ['currency_list', [[ ['name', '', '货币名'], ['address', '', '货币地址'], ]], '货币列表'], @@ -1895,3 +1895,13 @@ class BigwheelInfo(object): ['!items1', [BigwheelGrid()], '档位1'], ['!items2', [BigwheelGrid()], '档位2'], ] + +class CecContributionActivity(object): + + def __init__(self): + self.fields = [ + ['my_contribution', 0, '我的贡献点数'], + ['global_contribution', 0, '全服贡献点数'], + ['total_cec_pool', 0, 'cec总奖池'], + ['my_expected_cec', 0, '我预计可得cec'], + ] From 7a3852e67764566e28d97d4517ccd459d87744ce Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 16 Aug 2024 11:46:33 +0800 Subject: [PATCH 2/6] 1 --- sql/gamedb.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sql/gamedb.sql b/sql/gamedb.sql index 1b403ae7..ae56d1db 100644 --- a/sql/gamedb.sql +++ b/sql/gamedb.sql @@ -2013,3 +2013,22 @@ CREATE TABLE `t_contribution` ( UNIQUE KEY `idx_account_id` (`account_id`) ) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; /*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `t_contribution_history` +-- + +DROP TABLE IF EXISTS `t_contribution_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `t_contribution_history` ( + `idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id', + `account_id` varchar(60) NOT NULL DEFAULT '' COMMENT '账号id(channel + "_" + gameid + "_" + openid)', + `consume_gold` double NOT NULL DEFAULT '0' COMMENT '消费金币数', + `contribution` double NOT NULL DEFAULT '0' COMMENT '获得点数', + `createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间', + `modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间', + PRIMARY KEY (`idx`), + UNIQUE KEY `idx_account_id` (`account_id`) +) ENGINE=InnoDB AUTO_INCREMENT=10000 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +/*!40101 SET character_set_client = @saved_cs_client */; From 25b80fb51f464e53f157117848b5f29d32913822 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 16 Aug 2024 11:57:32 +0800 Subject: [PATCH 3/6] 1 --- doc/README.php | 6 ++++-- doc/_common.py | 13 +++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/doc/README.php b/doc/README.php index 5d6aee0e..2c386ca3 100644 --- a/doc/README.php +++ b/doc/README.php @@ -5,7 +5,10 @@ * @apiVersion 0.0.1 * @apiSuccessExample {json} Success-Response: * 所有的协议都可能携带award和property_chg,award用来显示获得的东西,propery_chg用来更新本地数据 - * + * 公共错误码 + * errcode=1001 session_id已过期(客户端需回到游戏主界面) + * errcode=1006 该接口已升级为S版(客户端需要转到sapi) + * errcode=1008 该接口功能已关闭(admin后台上配置为功能关闭,客户端需刷新功能开关) * * */ @@ -49,7 +52,6 @@ * 删除 c=Currency * 删除 c=PayMethod * 删除 c=OutAppPlanet - * 删除 c=Shop * 删除 c=BlockChain&a=getTransactionList * 删除 c=BlockChain&a=getTransactionInfo * 删除 c=BlockChain&a=reportResult diff --git a/doc/_common.py b/doc/_common.py index e112a834..fc7d72a6 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1843,6 +1843,14 @@ class ChainActivity(object): ['date', '', '事件发生时间'], ] +class RechargeCurrency(object): + + def __init__(self): + self.fields = [ + ['name', '', '货币名'], + ['address', '', '货币地址'], + ] + class RechargeGoods(object): def __init__(self): @@ -1853,10 +1861,7 @@ class RechargeGoods(object): ['first_present_diamond', 0, '首冲赠送钻石'], ['is_first_recharge', 0, '是否第一次购买该商品'], ['max_buy_times', 0, '充值次数上限'], - ['currency_list', [[ - ['name', '', '货币名'], - ['address', '', '货币地址'], - ]], '货币列表'], + ['!currency_list', [RechargeCurrency()], '货币列表'], ] class RechargeHistory(object): From fc4a91d6d5883bf54a4fa002cb5e406d64f3f74f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 16 Aug 2024 12:00:22 +0800 Subject: [PATCH 4/6] 1 --- doc/_common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/_common.py b/doc/_common.py index fc7d72a6..a9df2631 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -12,7 +12,7 @@ class RspHead(object): def __init__(self, **kwargs): self.fields = [ - ['errcode', 0, '错误码/0 成功;1 失败;2余额不足'], + ['errcode', 0, '错误码/0 成功;1 失败'], ['errmsg', '', '错误描述'], ] for (key, value) in kwargs.items(): From 4ca15244840b750e2eb3348beb3f26383d950dc7 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 16 Aug 2024 14:37:33 +0800 Subject: [PATCH 5/6] 1 --- doc/AALogin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/AALogin.py b/doc/AALogin.py index deaa7265..b1f213f4 100644 --- a/doc/AALogin.py +++ b/doc/AALogin.py @@ -26,6 +26,8 @@ class AALogin(object): 'params': [ ['gameid', '', '游戏id'], ['channel', '', '渠道编号'], + ['_packageid', 0, '包id 1:android 2:ios'], + ['_version', '', '版本号'], ], 'response': [ _common.RspHead(), From 2aad8ca948842519debbce3c0e4e9966daba1693 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 16 Aug 2024 14:44:30 +0800 Subject: [PATCH 6/6] 1 --- webapp/controller/AnncController.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapp/controller/AnncController.class.php b/webapp/controller/AnncController.class.php index d91df85d..26350365 100644 --- a/webapp/controller/AnncController.class.php +++ b/webapp/controller/AnncController.class.php @@ -8,11 +8,11 @@ class AnncController extends BaseController { // myself()->_rspData(require('../config/annc.php')); $data = array(); $row = myself()->_getConfDbMysql()->execQueryOne( - 'SELECT * FROM t_game_annc WHERE begin_time < :star_time AND end_time > :end_time AND is_open = :open_state', + 'SELECT * FROM t_game_annc WHERE begin_date < :begin_date AND end_date > :end_date AND is_open = :is_open', array( - ':star_time' => myself()->_getNowTime(), - ':end_time' => myself()->_getNowTime(), - ':open_state' => 1, + ':begin_date' => myself()->_getNowTime(), + ':end_date' => myself()->_getNowTime(), + ':is_open' => 1, ) ); if ($row){