diff --git a/app/hdl/institutional_management/egg_energy/hdl_basic.go b/app/hdl/institutional_management/egg_energy/hdl_basic.go index c30e299..227b0c1 100644 --- a/app/hdl/institutional_management/egg_energy/hdl_basic.go +++ b/app/hdl/institutional_management/egg_energy/hdl_basic.go @@ -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, } diff --git a/app/md/institutional_management/egg_energy/md_basic.go b/app/md/institutional_management/egg_energy/md_basic.go index a3d05ba..d82f092 100644 --- a/app/md/institutional_management/egg_energy/md_basic.go +++ b/app/md/institutional_management/egg_energy/md_basic.go @@ -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 { diff --git a/docs/docs.go b/docs/docs.go index 4dcd9d7..ecda2aa 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -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": { diff --git a/docs/swagger.json b/docs/swagger.json index 488bea6..0baf88b 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -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": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 4288e85..3052a99 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -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: