|
|
@@ -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, |
|
|
|
} |
|
|
|