软质押增加奖励发放记录

This commit is contained in:
lianghuanjie
2025-01-08 16:25:48 +08:00
parent 29abba438c
commit 5c4862fd70
8 changed files with 189 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ service novatask {
@handler UnStakeNft
post /nft/unstake (UnStakeNftReq)
@doc "质押任务奖励发放列表"
@doc "质押奖励发放列表"
@handler StakeRewardList
get /nft/stake_reward returns (StakeRewardList)
}
@@ -114,6 +114,7 @@ type StakeTaskDetail {
ProduceTokensToday float64 `json:"produce_token_today"` // 今日产出代币
GameBonus int `json:"game_bonus"` // 游戏加成比率
CanReceiveTokens float64 `json:"can_receive_tokens"` // 可领取代币数量
TotalIncomeTokens float64 `json:"total_income_tokens"` // 累计收益
}
// UserNft 用户NFT
@@ -145,3 +146,12 @@ type UnStakeNftReq {
TokenId string `json:"token_id"` // nftID
}
type StakeReward {
Date string `json:"date"` // 日期
Reward float64 `json:"reward"` // 当日发放奖励
}
type StakeRewardList {
RewardList []StakeReward `json:"reward_list"`
}

View File

@@ -275,6 +275,28 @@
]
}
},
"/gapi/task/v1/nft/stake_reward": {
"get": {
"summary": "质押奖励发放列表",
"operationId": "StakeRewardList",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/StakeRewardList"
}
}
},
"tags": [
"task"
],
"security": [
{
"apiKey": []
}
]
}
},
"/gapi/task/v1/nft/unstake": {
"post": {
"summary": "取消质押NFT",
@@ -682,6 +704,40 @@
"token_ids"
]
},
"StakeReward": {
"type": "object",
"properties": {
"date": {
"type": "string",
"description": " 日期"
},
"reward": {
"type": "number",
"format": "double",
"description": " 当日发放奖励"
}
},
"title": "StakeReward",
"required": [
"date",
"reward"
]
},
"StakeRewardList": {
"type": "object",
"properties": {
"reward_list": {
"type": "array",
"items": {
"$ref": "#/definitions/StakeReward"
}
}
},
"title": "StakeRewardList",
"required": [
"reward_list"
]
},
"StakeTaskDetail": {
"type": "object",
"properties": {
@@ -712,6 +768,11 @@
"type": "number",
"format": "double",
"description": " 可领取代币数量"
},
"total_income_tokens": {
"type": "number",
"format": "double",
"description": " 累计收益"
}
},
"title": "StakeTaskDetail",
@@ -721,7 +782,8 @@
"count_down",
"produce_token_today",
"game_bonus",
"can_receive_tokens"
"can_receive_tokens",
"total_income_tokens"
]
},
"Task": {