Browse Source

update and add total data

master
shenjiachi 1 month ago
parent
commit
f7469aa13b
8 changed files with 659 additions and 85 deletions
  1. +194
    -0
      app/hdl/institutional_management/egg_energy/hdl_basic.go
  2. +1
    -1
      app/hdl/institutional_management/public_platoon/hdl_basic.go
  3. +103
    -37
      app/md/institutional_management/egg_energy/md_basic.go
  4. +1
    -1
      app/md/institutional_management/public_platoon/md_public_platoon.go
  5. +6
    -0
      app/router/router.go
  6. +132
    -19
      docs/docs.go
  7. +132
    -19
      docs/swagger.json
  8. +90
    -8
      docs/swagger.yaml

+ 194
- 0
app/hdl/institutional_management/egg_energy/hdl_basic.go View File

@@ -7,9 +7,11 @@ import (
"applet/app/utils"
"code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
"code.fnuoos.com/EggPlanet/egg_models.git/src/model"
"code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/enum"
md2 "code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md"
"errors"
"github.com/gin-gonic/gin"
"time"
)

// GetVirtualCoinList
@@ -83,6 +85,9 @@ func GetEggEnergyBasic(c *gin.Context) {
var rewardSystem md2.RewardSystemStruct
utils.Unserialize([]byte(basicSettings.RewardSystem), rewardSystem)

var newUserRewardRules md2.NewUserRewardRules
utils.Unserialize([]byte(basicSettings.NewUserIncentiveRules), newUserRewardRules)

resp := md.GetEggEnergyBasicResp{
BasicSetting: md.BasicSetting{
IsOpen: basicSettings.IsOpen,
@@ -135,6 +140,11 @@ func GetEggEnergyBasic(c *gin.Context) {
RewardCondition: rewardSystem.RewardCondition,
RewardValue: rewardSystem.RewardValue,
},
NewUserIncentiveRules: md2.NewUserRewardRules{
InviteUserRewardValue: newUserRewardRules.InviteUserRewardValue,
RewardCoefficient: newUserRewardRules.RewardCoefficient,
ContinueDays: newUserRewardRules.ContinueDays,
},
SystemID: basicSettings.Id,
}

@@ -164,6 +174,7 @@ func UpdateEggEnergyBasic(c *gin.Context) {
videoRewardSystemStr := utils.SerializeStr(req.VideoRewardSetting.VideoRewardSystem)
exchangeRulesStr := utils.SerializeStr(req.ExchangeRules)
rewardSystemStr := utils.SerializeStr(req.RewardSystem)
newUserIncentiveRulesStr := utils.SerializeStr(req.NewUserIncentiveRules)

m := model.EggEnergyBasicSetting{
Id: req.SystemID,
@@ -186,6 +197,7 @@ func UpdateEggEnergyBasic(c *gin.Context) {
VideoRewardSystem: videoRewardSystemStr,
ExchangeRules: exchangeRulesStr,
RewardSystem: rewardSystemStr,
NewUserIncentiveRules: newUserIncentiveRulesStr,
}

energyBasicSettingDb := implement.NewEggEnergyBasicSettingDb(db.Db)
@@ -197,3 +209,185 @@ func UpdateEggEnergyBasic(c *gin.Context) {
}
e.OutSuc(c, affected, nil)
}

// GetEggCoreDataList
// @Summary 制度中心-蛋蛋能量-数据概览(获取)
// @Tags 蛋蛋能量
// @Description 数据概览(获取)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.GetEggCoreDataListReq false "起始时间请同时填写或同时不填"
// @Success 200 {object} md.GetEggCoreDataListResp "具体数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/globalData/coreDataList [post]
func GetEggCoreDataList(c *gin.Context) {
var req *md.GetEggCoreDataListReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
return
}

coreDataDb := implement.NewEggEnergyCoreDataDb(db.Db)
coreData, err := coreDataDb.EggEnergyCoreDataGet()
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
if coreData == nil {
e.OutErr(c, e.ERR_NO_DATA, errors.New("数据不存在"))
return
}

var startAt, endAt string
if req.StartAt == "" || req.EndAt == "" {
// 默认计算最近三十天 23 时的数据
nowHour := time.Now().Hour()
if nowHour >= 23 {
req.EndAt = time.Now().Format("2006-01-02")
req.StartAt = time.Now().Add(-30 * 24 * time.Duration(time.Hour)).Format("2006-01-02")
} else {
req.EndAt = time.Now().Add(-24 * time.Duration(time.Hour)).Format("2006-01-02")
req.StartAt = time.Now().Add(-31 * 24 * time.Duration(time.Hour)).Format("2006-01-02")
}
} else {
startAt = req.StartAt
endAt = req.EndAt
}

hour := "23"
energyPriceDb := implement.NewEggEnergyPriceDb(db.Db)
priceList, err := energyPriceDb.EggEnergyPriceList(startAt, endAt, hour)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
prices := make([]md.PriceNode, len(priceList))
for i, price := range priceList {
prices[i].Date = price.Date
prices[i].Price = price.Price
}

resp := md.GetEggCoreDataListResp{
PlanetTotalValue: coreData.PlanetTotalValue,
NowPrice: coreData.NowPrice,
NowEnergyTotalNums: coreData.NowEnergyTotalNums,
// todo 计算用户持有总量
UserHoldTotalNums: "",
Prices: prices,
}

e.OutSuc(c, resp, nil)
}

// GetFundDataList
// @Summary 制度中心-蛋蛋能量-新增数据列表(获取)
// @Tags 蛋蛋能量
// @Description 新增数据列表(获取)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.GetFundDataListReq true "分页信息必填"
// @Success 200 {object} md.GetFundDataListResp "具体数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/globalData/fundDataList [post]
func GetFundDataList(c *gin.Context) {
var req *md.GetFundDataListReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
return
}

var kindList = []map[string]interface{}{
{
"name": enum.EggEnergyFundDataKind.String(enum.CompanySubsidies),
"value": enum.CompanySubsidies,
},
{
"name": enum.EggEnergyFundDataKind.String(enum.InvestmentByInvestors),
"value": enum.InvestmentByInvestors,
},
{
"name": enum.EggEnergyFundDataKind.String(enum.MarketExpectations),
"value": enum.MarketExpectations,
},
}

fundDataDb := implement.NewEggEnergyFundDataDb(db.Db)
fundDataList, total, err := fundDataDb.EggEnergyFundDataFindAndCount(req.Page, req.Limit, req.Limit, req.StartAt, req.EndAt)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}

list := make([]md.FundDataNode, len(fundDataList))
for i, fundData := range fundDataList {
list[i].Kind = fundData.Kind
list[i].TotalAmount = fundData.TotalAmount
list[i].Hours = fundData.Hours
list[i].Memo = fundData.Memo
list[i].BalanceTimes = fundData.BalanceTimes
list[i].BalanceAmount = fundData.BalanceAmount
list[i].CreateAt = fundData.CreateAt
list[i].SystemID = fundData.Id
}

resp := md.GetFundDataListResp{
KindList: kindList,
Paginate: md.Paginate{
Limit: req.Limit,
Page: req.Page,
Total: total,
},
List: list,
}
e.OutSuc(c, resp, nil)
}

// GetFundDataRecordList
// @Summary 制度中心-蛋蛋能量-新增数据列表详情(查询)
// @Tags 蛋蛋能量
// @Description 新增数据列表详情(查询)
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body md.GetFundDataRecordListReq true "获取到的 system_id 以及分页信息"
// @Success 200 {object} md.GetFundDataRecordListResp "具体数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/institutionalManagement/eggEnergy/globalData/fundDataList [post]
func GetFundDataRecordList(c *gin.Context) {
var req *md.GetFundDataRecordListReq
if err1 := c.ShouldBindJSON(&req); err1 != nil {
e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error())
return
}

recordsDb := implement.NewEggEnergyFundDataRecordsDb(db.Db)
records, total, err := recordsDb.EggEnergyFundDataRecordsFindAndCount(req.Page, req.Limit, req.SystemID)
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err.Error())
return
}
var list []md.FundDataRecordNode
for i, record := range records {
list[i].TotalAmount = record.TotalAmount
list[i].BalanceAmount = record.BalanceAmount
list[i].BalanceTimes = record.BalanceTimes
list[i].BeforePrice = record.BeforePrice
list[i].AfterPrice = record.AfterPrice
list[i].BeforePlanetTotalValue = record.BeforePlanetTotalValue
list[i].AfterPlanetTotalValue = record.AfterPlanetTotalValue
list[i].CreateAt = record.CreateAt
}

resp := md.GetFundDataRecordListResp{
Paginate: md.Paginate{
Limit: req.Limit,
Page: req.Page,
Total: total,
},
List: list,
}

e.OutSuc(c, resp, nil)
}

+ 1
- 1
app/hdl/institutional_management/public_platoon/hdl_basic.go View File

@@ -498,7 +498,7 @@ func ListCommunityDividends(c *gin.Context) {
for i, dividend := range dividends {
list[i] = md.EggEnergyCommunityDividends{
Id: dividend.Id,
Nums: dividend.Nums,
Amount: dividend.Amount,
Name: dividend.Name,
CoinId: dividend.CoinId,
PersonsNum: dividend.PersonsNum,


+ 103
- 37
app/md/institutional_management/egg_energy/md_basic.go View File

@@ -2,26 +2,25 @@ package md

import (
"code.fnuoos.com/EggPlanet/egg_system_rules.git/rule/egg_energy/md"
"time"
)

type VirtualCoin struct {
Id int `json:"id" `
Name string `json:"name" ` // 名称
ExchangeRatio string `json:"exchange_ratio" ` // 兑换比例(与金额)
IsUse int `json:"is_use" ` // 是否开启: 0否 1是
CreateAt time.Time `json:"create_at" `
UpdateAt time.Time `json:"update_at" `
Id int `json:"id" `
Name string `json:"name" ` // 名称
ExchangeRatio string `json:"exchange_ratio" example:"兑换比例(与金额)"` // 兑换比例(与金额)
IsUse int `json:"is_use" ` // 是否开启: 0否 1是
CreateAt string `json:"create_at" `
UpdateAt string `json:"update_at" `
}

// BasicSetting 基础设置
type BasicSetting struct {
IsOpen int `json:"is_open" ` // 是否开启(1:开启 0:关闭)
PersonEggEnergyCoinId int `json:"person_egg_energy_coin_id" ` // 个人蛋蛋能量对应虚拟币 id
TeamEggEnergyCoinId int `json:"team_egg_energy_coin_id" ` // 团队蛋蛋能量对应虚拟币 id
PersonEggPointsCoinId int `json:"person_egg_points_coin_id" ` // 个人蛋蛋积分对应虚拟币 id
TeamEggPointsCoinId int `json:"team_egg_points_coin_id" ` // 团队蛋蛋积分对应虚拟币 id
DirectPushReward string `json:"direct_push_reward" ` // 直推奖励
IsOpen int `json:"is_open" ` // 是否开启(1:开启 0:关闭)
PersonEggEnergyCoinId int `json:"person_egg_energy_coin_id" ` // 个人蛋蛋能量对应虚拟币 id
TeamEggEnergyCoinId int `json:"team_egg_energy_coin_id" ` // 团队蛋蛋能量对应虚拟币 id
PersonEggPointsCoinId int `json:"person_egg_points_coin_id" ` // 个人蛋蛋积分对应虚拟币 id
TeamEggPointsCoinId int `json:"team_egg_points_coin_id" ` // 团队蛋蛋积分对应虚拟币 id
DirectPushReward string `json:"direct_push_reward" example:"直推奖励"` // 直推奖励
}

// VideoRewardSetting 视频奖励
@@ -32,34 +31,101 @@ type VideoRewardSetting struct {

// DataSetting 数据设置
type DataSetting struct {
TotalIssuanceAmount string `json:"total_issuance_amount"` // 总发行量
TotalTechnologyTeam string `json:"total_technology_team"` // 技术团队
TotalAngelInvestor string `json:"total_angel_investor"` // 天使投资人
TotalOperateFund string `json:"total_operate_fund"` // 运营资金
TotalEcologicalDevelopment string `json:"total_ecological_development"` // 生态建设
TotalUserForPerson string `json:"total_user_for_person"` // 个人区域
TotalUserForTeam string `json:"total_user_for_team"` // 团队区域
TotalIssuanceAmount string `json:"total_issuance_amount" example:"总发行量"` // 总发行量
TotalTechnologyTeam string `json:"total_technology_team" example:"技术团队"` // 技术团队
TotalAngelInvestor string `json:"total_angel_investor" example:"天使投资人"` // 天使投资人
TotalOperateFund string `json:"total_operate_fund" example:"运营资金"` // 运营资金
TotalEcologicalDevelopment string `json:"total_ecological_development" example:"当前价格"` // 生态建设
// TotalTeamDividends string`json:"total_team_dividends" example:"团队分红"` // 团队分红
TotalUserForPerson string `json:"total_user_for_person" example:"个人区域"` // 个人区域
TotalUserForTeam string `json:"total_user_for_team" example:"团队区域"` // 团队区域
}

type GetEggEnergyBasicResp struct {
BasicSetting BasicSetting `json:"basic_setting"` // 基础设置
VideoRewardSetting VideoRewardSetting `json:"video_reward_setting"` // 视频奖励
DataSetting DataSetting `json:"data_setting"` // 数据设置
DestructionSetting md.DestructionSettingStruct `json:"destruction_setting"` // 销毁设置
PriceSetting md.PriceSettingStruct `json:"price_setting"` // 价格设置
ExchangeRules md.ExchangeRulesStruct `json:"exchange_rules"` // 兑换规则
RewardSystem md.RewardSystemStruct `json:"reward_system"` // 圈层奖励
SystemID int `json:"system_id"` // 该设置系统 ID
BasicSetting BasicSetting `json:"basic_setting"` // 基础设置
VideoRewardSetting VideoRewardSetting `json:"video_reward_setting"` // 视频奖励
DataSetting DataSetting `json:"data_setting"` // 数据设置
DestructionSetting md.DestructionSettingStruct `json:"destruction_setting"` // 销毁设置
PriceSetting md.PriceSettingStruct `json:"price_setting"` // 价格设置
ExchangeRules md.ExchangeRulesStruct `json:"exchange_rules"` // 兑换规则
RewardSystem md.RewardSystemStruct `json:"reward_system"` // 圈层奖励
NewUserIncentiveRules md.NewUserRewardRules `json:"new_user_incentive_rules"` // 新用户奖励规则
SystemID int `json:"system_id"` // 该设置系统 ID
}

type UpdateEggEnergyBasicReq struct {
SystemID int `json:"system_id,required"` // 该设置系统 ID
BasicSetting BasicSetting `json:"basic_setting"` // 基础设置
VideoRewardSetting VideoRewardSetting `json:"video_reward_setting"` // 视频奖励
DataSetting DataSetting `json:"data_setting"` // 数据设置
DestructionSetting md.DestructionSettingStruct `json:"destruction_setting"` // 销毁设置
PriceSetting md.PriceSettingStruct `json:"price_setting"` // 价格设置
ExchangeRules md.ExchangeRulesStruct `json:"exchange_rules"` // 兑换规则
RewardSystem md.RewardSystemStruct `json:"reward_system"` // 圈层奖励
SystemID int `json:"system_id,required"` // 该设置系统 ID
BasicSetting BasicSetting `json:"basic_setting"` // 基础设置
VideoRewardSetting VideoRewardSetting `json:"video_reward_setting"` // 视频奖励
DataSetting DataSetting `json:"data_setting"` // 数据设置
DestructionSetting md.DestructionSettingStruct `json:"destruction_setting"` // 销毁设置
PriceSetting md.PriceSettingStruct `json:"price_setting"` // 价格设置
ExchangeRules md.ExchangeRulesStruct `json:"exchange_rules"` // 兑换规则
RewardSystem md.RewardSystemStruct `json:"reward_system"` // 圈层奖励
NewUserIncentiveRules md.NewUserRewardRules `json:"new_user_incentive_rules"` // 新用户奖励规则 // 新用户奖励规则
}

type GetEggCoreDataListReq struct {
StartAt string `json:"start_at" example:"开始时间"`
EndAt string `json:"end_at" example:"结束时间"`
}

type PriceNode struct {
Date string `json:"date" example:"日期"`
Price string `json:"price" example:"价格"`
}

type GetEggCoreDataListResp struct {
PlanetTotalValue string `json:"planet_total_value" example:"星球价值"` // 星球价值
NowPrice string `json:"now_price" example:"当前价格"` // 当前价格
NowEnergyTotalNums string `json:"now_energy_total_nums" example:"现行总量"` // 现行总量
UserHoldTotalNums string `json:"user_hold_total_nums" example:"用户持有总量"` // 用户持有总量
Prices []PriceNode `json:"prices"` // 价格散点列表
}

type GetFundDataListReq struct {
Kind int `json:"kind"` // 数据类型
StartAt string `json:"start_at" example:"开始时间"`
EndAt string `json:"end_at" example:"结束时间"`
Page int `json:"page,required"` // 页数
Limit int `json:"limit,required" ` // 每页大小
}

type FundDataNode struct {
SystemID int `json:"system_id"`
Kind int `json:"kind" ` //种类(1:公司补贴 2:资方投资 3:市场期望)
TotalAmount string `json:"total_amount" ` // 金额
BalanceAmount string `json:"balance_amount" ` // 余额
Hours int `json:"hours" ` // 时长
BalanceTimes int `json:"balance_times" ` // 剩余执行次数
Memo string `json:"memo" ` // 备注
CreateAt string `json:"create_at" ` // 创建时间
}

type GetFundDataListResp struct {
KindList []map[string]interface{} `json:"kind_list"` // 类型列表
Paginate Paginate `json:"paginate"` // 分页数据
List []FundDataNode `json:"list"` // 数据列表
}

type GetFundDataRecordListReq struct {
SystemID int `json:"system_id,required"` // 数据在系统中的 ID
Page int `json:"page,required"` // 页数
Limit int `json:"limit,required"` // 页面大小
}

type FundDataRecordNode struct {
TotalAmount string `json:"total_amount" ` // 金额
BalanceAmount string `json:"balance_amount" ` // 余额
BalanceTimes int `json:"balance_times" ` //剩余执行次数
BeforePrice string `json:"before_price" ` // 执行前-价格
AfterPrice string `json:"after_price" ` // 执行后-价格
BeforePlanetTotalValue string `json:"before_planet_total_value" ` // 执行前-星球价值
AfterPlanetTotalValue string `json:"after_planet_total_value" ` // 执行后-星球价值
CreateAt string `json:"create_at" `
}

type GetFundDataRecordListResp struct {
List []FundDataRecordNode `json:"list"`
Paginate Paginate `json:"paginate"`
}

+ 1
- 1
app/md/institutional_management/public_platoon/md_public_platoon.go View File

@@ -102,7 +102,7 @@ type ListCommunityDividendsReq struct {

type EggEnergyCommunityDividends struct {
Id int `json:"id"`
Nums int `json:"nums"` // 分红数量
Amount string `json:"amount"` // 分红数量
Name string `json:"name" example:"名称"`
CoinId int `json:"coin_id"` // 虚拟币 id
PersonsNum int `json:"persons_num"` // 分红人数


+ 6
- 0
app/router/router.go View File

@@ -100,6 +100,12 @@ func rInstitutionalManagement(r *gin.RouterGroup) { //制度管理
{
rEggEnergyAvailableEnergy.POST("/list", egg_energy.DynamicDataFlowList)
}
rEggGlobalData := rEggEnergy.Group("/globalData")
{
rEggGlobalData.POST("/coreDataList", egg_energy.GetEggCoreDataList)
rEggGlobalData.POST("/fundDataList", egg_energy.GetFundDataList)
rEggGlobalData.POST("/fundDataListRecord", egg_energy.GetFundDataRecordList)
}
}
}



+ 132
- 19
docs/docs.go View File

@@ -142,6 +142,52 @@ const docTemplate = `{
}
}
},
"/api/institutionalManagement/eggEnergy/globalData/coreDataList": {
"post": {
"description": "数据概览(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋能量"
],
"summary": "制度中心-蛋蛋能量-数据概览(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "起始时间请同时填写或同时不填",
"name": "req",
"in": "body",
"schema": {
"$ref": "#/definitions/md.GetEggCoreDataListReq"
}
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.GetEggCoreDataListResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggEnergy/updateBasic": {
"post": {
"description": "基础设置(获取)",
@@ -1025,7 +1071,8 @@ const docTemplate = `{
"properties": {
"direct_push_reward": {
"description": "直推奖励",
"type": "string"
"type": "string",
"example": "直推奖励"
},
"is_open": {
"description": "是否开启(1:开启 0:关闭)",
@@ -1143,13 +1190,13 @@ const docTemplate = `{
"md.AddCommunityDividendsReq": {
"type": "object",
"properties": {
"amount": {
"description": "社区分红数量",
"type": "string"
},
"name": {
"type": "string",
"example": "社区分红名称"
},
"nums": {
"description": "社区分红数量",
"type": "string"
}
}
},
@@ -1196,31 +1243,38 @@ const docTemplate = `{
"properties": {
"total_angel_investor": {
"description": "天使投资人",
"type": "string"
"type": "string",
"example": "天使投资人"
},
"total_ecological_development": {
"description": "生态建设",
"type": "string"
"type": "string",
"example": "当前价格"
},
"total_issuance_amount": {
"description": "总发行量",
"type": "string"
"type": "string",
"example": "总发行量"
},
"total_operate_fund": {
"description": "运营资金",
"type": "string"
"type": "string",
"example": "运营资金"
},
"total_technology_team": {
"description": "技术团队",
"type": "string"
"type": "string",
"example": "技术团队"
},
"total_user_for_person": {
"description": "个人区域",
"type": "string"
"description": "TotalTeamDividends string` + "`" + `json:\"total_team_dividends\" example:\"团队分红\"` + "`" + ` // 团队分红",
"type": "string",
"example": "个人区域"
},
"total_user_for_team": {
"description": "团队区域",
"type": "string"
"type": "string",
"example": "团队区域"
}
}
},
@@ -1384,6 +1438,10 @@ const docTemplate = `{
"md.EggEnergyCommunityDividends": {
"type": "object",
"properties": {
"amount": {
"description": "分红数量",
"type": "string"
},
"coin_id": {
"description": "虚拟币 id",
"type": "integer"
@@ -1403,10 +1461,6 @@ const docTemplate = `{
"type": "string",
"example": "名称"
},
"nums": {
"description": "分红数量",
"type": "integer"
},
"persons_num": {
"description": "分红人数",
"type": "integer"
@@ -1637,6 +1691,51 @@ const docTemplate = `{
}
}
},
"md.GetEggCoreDataListReq": {
"type": "object",
"properties": {
"end_at": {
"type": "string",
"example": "结束时间"
},
"start_at": {
"type": "string",
"example": "开始时间"
}
}
},
"md.GetEggCoreDataListResp": {
"type": "object",
"properties": {
"now_energy_total_nums": {
"description": "现行总量",
"type": "string",
"example": "现行总量"
},
"now_price": {
"description": "当前价格",
"type": "string",
"example": "当前价格"
},
"planet_total_value": {
"description": "星球价值",
"type": "string",
"example": "星球价值"
},
"prices": {
"description": "价格散点列表",
"type": "array",
"items": {
"$ref": "#/definitions/md.PriceNode"
}
},
"user_hold_total_nums": {
"description": "用户持有总量",
"type": "string",
"example": "用户持有总量"
}
}
},
"md.GetEggEnergyBasicResp": {
"type": "object",
"properties": {
@@ -1689,7 +1788,7 @@ const docTemplate = `{
]
},
"system_id": {
"description": "该设置系统 ID",
"description": "NewUserIncentiveRules md.\t\t\t\t\t\t\t\t\t\t\t\t\t // 新用户奖励规则",
"type": "integer"
},
"video_reward_setting": {
@@ -2000,6 +2099,19 @@ const docTemplate = `{
}
}
},
"md.PriceNode": {
"type": "object",
"properties": {
"date": {
"type": "string",
"example": "日期"
},
"price": {
"type": "string",
"example": "价格"
}
}
},
"md.PriceSettingStruct": {
"type": "object",
"properties": {
@@ -2400,7 +2512,8 @@ const docTemplate = `{
},
"exchange_ratio": {
"description": "兑换比例(与金额)",
"type": "string"
"type": "string",
"example": "兑换比例(与金额)"
},
"id": {
"type": "integer"


+ 132
- 19
docs/swagger.json View File

@@ -135,6 +135,52 @@
}
}
},
"/api/institutionalManagement/eggEnergy/globalData/coreDataList": {
"post": {
"description": "数据概览(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"蛋蛋能量"
],
"summary": "制度中心-蛋蛋能量-数据概览(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
},
{
"description": "起始时间请同时填写或同时不填",
"name": "req",
"in": "body",
"schema": {
"$ref": "#/definitions/md.GetEggCoreDataListReq"
}
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/md.GetEggCoreDataListResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
}
},
"/api/institutionalManagement/eggEnergy/updateBasic": {
"post": {
"description": "基础设置(获取)",
@@ -1018,7 +1064,8 @@
"properties": {
"direct_push_reward": {
"description": "直推奖励",
"type": "string"
"type": "string",
"example": "直推奖励"
},
"is_open": {
"description": "是否开启(1:开启 0:关闭)",
@@ -1136,13 +1183,13 @@
"md.AddCommunityDividendsReq": {
"type": "object",
"properties": {
"amount": {
"description": "社区分红数量",
"type": "string"
},
"name": {
"type": "string",
"example": "社区分红名称"
},
"nums": {
"description": "社区分红数量",
"type": "string"
}
}
},
@@ -1189,31 +1236,38 @@
"properties": {
"total_angel_investor": {
"description": "天使投资人",
"type": "string"
"type": "string",
"example": "天使投资人"
},
"total_ecological_development": {
"description": "生态建设",
"type": "string"
"type": "string",
"example": "当前价格"
},
"total_issuance_amount": {
"description": "总发行量",
"type": "string"
"type": "string",
"example": "总发行量"
},
"total_operate_fund": {
"description": "运营资金",
"type": "string"
"type": "string",
"example": "运营资金"
},
"total_technology_team": {
"description": "技术团队",
"type": "string"
"type": "string",
"example": "技术团队"
},
"total_user_for_person": {
"description": "个人区域",
"type": "string"
"description": "TotalTeamDividends string`json:\"total_team_dividends\" example:\"团队分红\"` // 团队分红",
"type": "string",
"example": "个人区域"
},
"total_user_for_team": {
"description": "团队区域",
"type": "string"
"type": "string",
"example": "团队区域"
}
}
},
@@ -1377,6 +1431,10 @@
"md.EggEnergyCommunityDividends": {
"type": "object",
"properties": {
"amount": {
"description": "分红数量",
"type": "string"
},
"coin_id": {
"description": "虚拟币 id",
"type": "integer"
@@ -1396,10 +1454,6 @@
"type": "string",
"example": "名称"
},
"nums": {
"description": "分红数量",
"type": "integer"
},
"persons_num": {
"description": "分红人数",
"type": "integer"
@@ -1630,6 +1684,51 @@
}
}
},
"md.GetEggCoreDataListReq": {
"type": "object",
"properties": {
"end_at": {
"type": "string",
"example": "结束时间"
},
"start_at": {
"type": "string",
"example": "开始时间"
}
}
},
"md.GetEggCoreDataListResp": {
"type": "object",
"properties": {
"now_energy_total_nums": {
"description": "现行总量",
"type": "string",
"example": "现行总量"
},
"now_price": {
"description": "当前价格",
"type": "string",
"example": "当前价格"
},
"planet_total_value": {
"description": "星球价值",
"type": "string",
"example": "星球价值"
},
"prices": {
"description": "价格散点列表",
"type": "array",
"items": {
"$ref": "#/definitions/md.PriceNode"
}
},
"user_hold_total_nums": {
"description": "用户持有总量",
"type": "string",
"example": "用户持有总量"
}
}
},
"md.GetEggEnergyBasicResp": {
"type": "object",
"properties": {
@@ -1682,7 +1781,7 @@
]
},
"system_id": {
"description": "该设置系统 ID",
"description": "NewUserIncentiveRules md.\t\t\t\t\t\t\t\t\t\t\t\t\t // 新用户奖励规则",
"type": "integer"
},
"video_reward_setting": {
@@ -1993,6 +2092,19 @@
}
}
},
"md.PriceNode": {
"type": "object",
"properties": {
"date": {
"type": "string",
"example": "日期"
},
"price": {
"type": "string",
"example": "价格"
}
}
},
"md.PriceSettingStruct": {
"type": "object",
"properties": {
@@ -2393,7 +2505,8 @@
},
"exchange_ratio": {
"description": "兑换比例(与金额)",
"type": "string"
"type": "string",
"example": "兑换比例(与金额)"
},
"id": {
"type": "integer"


+ 90
- 8
docs/swagger.yaml View File

@@ -3,6 +3,7 @@ definitions:
properties:
direct_push_reward:
description: 直推奖励
example: 直推奖励
type: string
is_open:
description: 是否开启(1:开启 0:关闭)
@@ -87,12 +88,12 @@ definitions:
type: object
md.AddCommunityDividendsReq:
properties:
amount:
description: 社区分红数量
type: string
name:
example: 社区分红名称
type: string
nums:
description: 社区分红数量
type: string
type: object
md.AddCommunityDividendsWithUserReq:
properties:
@@ -124,24 +125,32 @@ definitions:
properties:
total_angel_investor:
description: 天使投资人
example: 天使投资人
type: string
total_ecological_development:
description: 生态建设
example: 当前价格
type: string
total_issuance_amount:
description: 总发行量
example: 总发行量
type: string
total_operate_fund:
description: 运营资金
example: 运营资金
type: string
total_technology_team:
description: 技术团队
example: 技术团队
type: string
total_user_for_person:
description: 个人区域
description: TotalTeamDividends string`json:"total_team_dividends" example:"团队分红"`
// 团队分红
example: 个人区域
type: string
total_user_for_team:
description: 团队区域
example: 团队区域
type: string
type: object
md.DestructionSettingStruct:
@@ -254,6 +263,9 @@ definitions:
type: object
md.EggEnergyCommunityDividends:
properties:
amount:
description: 分红数量
type: string
coin_id:
description: 虚拟币 id
type: integer
@@ -268,9 +280,6 @@ definitions:
name:
example: 名称
type: string
nums:
description: 分红数量
type: integer
persons_num:
description: 分红人数
type: integer
@@ -426,6 +435,39 @@ definitions:
description: 持有该类型用户数
type: integer
type: object
md.GetEggCoreDataListReq:
properties:
end_at:
example: 结束时间
type: string
start_at:
example: 开始时间
type: string
type: object
md.GetEggCoreDataListResp:
properties:
now_energy_total_nums:
description: 现行总量
example: 现行总量
type: string
now_price:
description: 当前价格
example: 当前价格
type: string
planet_total_value:
description: 星球价值
example: 星球价值
type: string
prices:
description: 价格散点列表
items:
$ref: '#/definitions/md.PriceNode'
type: array
user_hold_total_nums:
description: 用户持有总量
example: 用户持有总量
type: string
type: object
md.GetEggEnergyBasicResp:
properties:
basic_setting:
@@ -453,7 +495,7 @@ definitions:
- $ref: '#/definitions/md.RewardSystemStruct'
description: 圈层奖励
system_id:
description: 该设置系统 ID
description: "NewUserIncentiveRules md.\t\t\t\t\t\t\t\t\t\t\t\t\t // 新用户奖励规则"
type: integer
video_reward_setting:
allOf:
@@ -664,6 +706,15 @@ definitions:
token:
type: string
type: object
md.PriceNode:
properties:
date:
example: 日期
type: string
price:
example: 价格
type: string
type: object
md.PriceSettingStruct:
properties:
marketplace_merchants_fund_exchange_marketplace_merchants_nums_value:
@@ -932,6 +983,7 @@ definitions:
type: string
exchange_ratio:
description: 兑换比例(与金额)
example: 兑换比例(与金额)
type: string
id:
type: integer
@@ -1048,6 +1100,36 @@ paths:
summary: 制度中心-蛋蛋能量-基础设置(获取)
tags:
- 蛋蛋能量
/api/institutionalManagement/eggEnergy/globalData/coreDataList:
post:
consumes:
- application/json
description: 数据概览(获取)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
- description: 起始时间请同时填写或同时不填
in: body
name: req
schema:
$ref: '#/definitions/md.GetEggCoreDataListReq'
produces:
- application/json
responses:
"200":
description: 具体数据
schema:
$ref: '#/definitions/md.GetEggCoreDataListResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-蛋蛋能量-数据概览(获取)
tags:
- 蛋蛋能量
/api/institutionalManagement/eggEnergy/updateBasic:
post:
consumes:


Loading…
Cancel
Save