Browse Source

update

master
shenjiachi 1 month ago
parent
commit
7abfb56311
5 changed files with 58 additions and 8 deletions
  1. +1
    -3
      app/hdl/institutional_management/egg_energy/hdl_basic.go
  2. +8
    -2
      app/md/institutional_management/egg_energy/md_basic.go
  3. +18
    -1
      docs/docs.go
  4. +18
    -1
      docs/swagger.json
  5. +13
    -1
      docs/swagger.yaml

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

@@ -342,19 +342,17 @@ func UpdateEggEnergyVipSetting(c *gin.Context) {
return
}
levelsList := make([]map[string]interface{}, 0)
levelsMap := make(map[string]int)
for _, level := range levels {
levelsList = append(levelsList, map[string]interface{}{
"id": level.Id,
"name": level.LevelName,
})
levelsMap[level.LevelName] = level.Id
}

vipEquitySetting := make([]md2.VipEquitySettingStruct, len(req.List))
for i, node := range req.List {
vipEquitySetting[i] = md2.VipEquitySettingStruct{
VipLevelId: utils.IntToStr(levelsMap[node.VipLevelName]),
VipLevelId: node.VipLevelID,
ExchangeAccountBalanceFee: node.ExchangeAccountBalanceFee,
DividendRatio: node.DividendRatio,
}


+ 8
- 2
app/md/institutional_management/egg_energy/md_basic.go View File

@@ -81,13 +81,19 @@ type GetEggEnergyVipSettingResp struct {
}

type AddEggEnergyVipSettingReq struct {
VipLevelId string `json:"vip_level_id"` //会员等级id
VipLevelId string `json:"vip_level_id"` //会员等级ID
ExchangeAccountBalanceFee string `json:"exchange_account_balance_fee"` //兑换余额手续费
DividendRatio string `json:"dividend_ratio"` //分红比例
}

type UpdateVipEquitySettingNode struct {
VipLevelID string `json:"vip_level_id"` // 会员等级ID
ExchangeAccountBalanceFee string `json:"exchange_account_balance_fee"` //兑换余额手续费
DividendRatio string `json:"dividend_ratio"` //分红比例
}

type UpdateEggEnergyVipSettingReq struct {
List []VipEquitySettingNode `json:"list"` // 更新后数据
List []UpdateVipEquitySettingNode `json:"list"` // 更新后数据
}

type GetEggCoreDataListResp struct {


+ 18
- 1
docs/docs.go View File

@@ -5678,7 +5678,7 @@ const docTemplate = `{
"description": "更新后数据",
"type": "array",
"items": {
"$ref": "#/definitions/md.VipEquitySettingNode"
"$ref": "#/definitions/md.UpdateVipEquitySettingNode"
}
}
}
@@ -5794,6 +5794,23 @@ const docTemplate = `{
}
}
},
"md.UpdateVipEquitySettingNode": {
"type": "object",
"properties": {
"dividend_ratio": {
"description": "分红比例",
"type": "string"
},
"exchange_account_balance_fee": {
"description": "兑换余额手续费",
"type": "string"
},
"vip_level_id": {
"description": "会员等级ID",
"type": "string"
}
}
},
"md.UserDailyActivityAnalysisReq": {
"type": "object",
"properties": {


+ 18
- 1
docs/swagger.json View File

@@ -5671,7 +5671,7 @@
"description": "更新后数据",
"type": "array",
"items": {
"$ref": "#/definitions/md.VipEquitySettingNode"
"$ref": "#/definitions/md.UpdateVipEquitySettingNode"
}
}
}
@@ -5787,6 +5787,23 @@
}
}
},
"md.UpdateVipEquitySettingNode": {
"type": "object",
"properties": {
"dividend_ratio": {
"description": "分红比例",
"type": "string"
},
"exchange_account_balance_fee": {
"description": "兑换余额手续费",
"type": "string"
},
"vip_level_id": {
"description": "会员等级ID",
"type": "string"
}
}
},
"md.UserDailyActivityAnalysisReq": {
"type": "object",
"properties": {


+ 13
- 1
docs/swagger.yaml View File

@@ -1817,7 +1817,7 @@ definitions:
list:
description: 更新后数据
items:
$ref: '#/definitions/md.VipEquitySettingNode'
$ref: '#/definitions/md.UpdateVipEquitySettingNode'
type: array
type: object
md.UpdateLevelReq:
@@ -1900,6 +1900,18 @@ definitions:
description: 标签 ID
type: string
type: object
md.UpdateVipEquitySettingNode:
properties:
dividend_ratio:
description: 分红比例
type: string
exchange_account_balance_fee:
description: 兑换余额手续费
type: string
vip_level_id:
description: 会员等级ID
type: string
type: object
md.UserDailyActivityAnalysisReq:
properties:
end_date:


Loading…
Cancel
Save