From 3565943aca5107f99fe67ba7f391cb5a9fc6ca50 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 28 Aug 2023 15:11:14 +0800 Subject: [PATCH] 1 --- doc/Staking.py | 15 +++++++++++++++ doc/_common.py | 2 ++ webapp/models/Staking.php | 1 + 3 files changed, 18 insertions(+) diff --git a/doc/Staking.py b/doc/Staking.py index 5484080f..94709288 100644 --- a/doc/Staking.py +++ b/doc/Staking.py @@ -54,4 +54,19 @@ class Staking(object): ['!items', [_common.StakingDetail()], '领取历史'], ] }, + { + 'name': 'redeemPreview', + 'desc': '赎回预览', + 'group': 'Staking', + 'url': 'webapp/index.php?c=Staking&a=redeemPreview', + 'params': [ + _common.ReqHead(), + ['trans_id', '', 'trans_id'], + ], + 'response': [ + _common.RspHead(), + ['cec_rewards', 0, '该nft结算得到的ceg数量'], + ['state', 0, '0:提前赎回 1:到期赎回'], + ] + }, ] diff --git a/doc/_common.py b/doc/_common.py index 7155ae2a..d2b8fb31 100644 --- a/doc/_common.py +++ b/doc/_common.py @@ -1436,10 +1436,12 @@ class StakingDetail(object): def __init__(self): self.fields = [ + ['trans_id', '', '本次质押交易唯一id'], ['token_id', '', 'token id'], ['token_type', '', 'token type'], ['contract_address', '', 'contract address'], ['net_id', '', 'net_id'], + ['order_id', '', 'order_id'], ['start_time', '', '质押开始时间'], ['stake_time', '', '质押时间'], ['txhash', '', 'txhash'], diff --git a/webapp/models/Staking.php b/webapp/models/Staking.php index 968af367..225e250b 100644 --- a/webapp/models/Staking.php +++ b/webapp/models/Staking.php @@ -187,6 +187,7 @@ class Staking extends BaseModel { 'token_type' => $row['token_type'], 'contract_address' => $row['contract_address'], 'net_id' => $row['net_id'], + 'order_id' => $row['order_id'], 'start_time' => $row['start_time'], 'stake_time' => $row['stake_time'], 'txhash' => $row['txhash'],