fix: 模型固定价格为空时错误使用默认价格

This commit is contained in:
CaIon
2024-03-23 17:19:29 +08:00
parent d0acecb2ab
commit 67332bc8df
3 changed files with 24 additions and 24 deletions

View File

@@ -78,8 +78,8 @@ func InitOptionMap() {
common.OptionMap["QuotaForInvitee"] = strconv.Itoa(common.QuotaForInvitee)
common.OptionMap["QuotaRemindThreshold"] = strconv.Itoa(common.QuotaRemindThreshold)
common.OptionMap["PreConsumedQuota"] = strconv.Itoa(common.PreConsumedQuota)
common.OptionMap["ModelRatio"] = common.ModelRatio2JSONString()
common.OptionMap["ModelPrice"] = common.ModelPrice2JSONString()
common.OptionMap["modelRatio"] = common.ModelRatio2JSONString()
common.OptionMap["modelPrice"] = common.ModelPrice2JSONString()
common.OptionMap["GroupRatio"] = common.GroupRatio2JSONString()
common.OptionMap["TopUpLink"] = common.TopUpLink
common.OptionMap["ChatLink"] = common.ChatLink
@@ -271,11 +271,11 @@ func updateOptionMap(key string, value string) (err error) {
common.DataExportInterval, _ = strconv.Atoi(value)
case "DataExportDefaultTime":
common.DataExportDefaultTime = value
case "ModelRatio":
case "modelRatio":
err = common.UpdateModelRatioByJSONString(value)
case "GroupRatio":
err = common.UpdateGroupRatioByJSONString(value)
case "ModelPrice":
case "modelPrice":
err = common.UpdateModelPriceByJSONString(value)
case "TopUpLink":
common.TopUpLink = value