@@ -748,8 +748,12 @@ func getVirtualCoinRatio(typ string, level, peerNum int, grade map[int]*LvGrade, | |||||
switch typ { | switch typ { | ||||
case "extend_lv": | case "extend_lv": | ||||
if isPostion == 1 { | if isPostion == 1 { | ||||
ratio, ok = grade[level].SecondExtendList[coinId] | |||||
ratio = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(ratio)/100, 4) | |||||
SecondExtendList, ok1 := grade[level].SecondExtendList.(map[string]string) | |||||
if ok1 { | |||||
ratio, ok = SecondExtendList[coinId] | |||||
ratio = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(ratio)/100, 4) | |||||
} | |||||
} else { | } else { | ||||
ratio, ok = grade[level].NewExtendList[coinId] | ratio, ok = grade[level].NewExtendList[coinId] | ||||
ratio = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(ratio)/100, 4) | ratio = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(ratio)/100, 4) | ||||
@@ -70,7 +70,10 @@ func getVirtualCoinRatioDsOwn(typ string, level, peerNum int, grade map[int]*LvG | |||||
switch typ { | switch typ { | ||||
case "extend_lv": | case "extend_lv": | ||||
if isPostion == 1 { | if isPostion == 1 { | ||||
ratio, ok = grade[level].SecondExtendList[coinId] | |||||
SecondExtendList, ok1 := grade[level].SecondExtendList.(map[string]string) | |||||
if ok1 { | |||||
ratio, ok = SecondExtendList[coinId] | |||||
} | |||||
} else { | } else { | ||||
ratio, ok = grade[level].NewExtendList[coinId] | ratio, ok = grade[level].NewExtendList[coinId] | ||||
} | } | ||||
@@ -72,7 +72,7 @@ type LvGrade struct { | |||||
TeamRateList map[string]string `json:"team_rate_list"` // 团队最高比例 | TeamRateList map[string]string `json:"team_rate_list"` // 团队最高比例 | ||||
NewTeamList map[string]string `json:"new_team_list"` // 新团队比例 | NewTeamList map[string]string `json:"new_team_list"` // 新团队比例 | ||||
NewExtendList map[string]string `json:"new_extend_list"` // 直推比例 | NewExtendList map[string]string `json:"new_extend_list"` // 直推比例 | ||||
SecondExtendList map[string]string `json:"second_extend_list"` // 直推比例 | |||||
SecondExtendList interface{} `json:"second_extend_list"` // 直推比例 | |||||
ToTeamList map[string]string `json:"to_team_list"` // 直推比例 | ToTeamList map[string]string `json:"to_team_list"` // 直推比例 | ||||
SameUserCount string `json:"same_user_count"` | SameUserCount string `json:"same_user_count"` | ||||
SameExtend []map[string]string `json:"same_extend"` | SameExtend []map[string]string `json:"same_extend"` | ||||
@@ -85,7 +85,7 @@ type LvGrade struct { | |||||
TikTokTeamSubsidyOwnBiliType []string `json:"tik_tok_team_subsidy_own_bili_type"` //分销 返利类型 | TikTokTeamSubsidyOwnBiliType []string `json:"tik_tok_team_subsidy_own_bili_type"` //分销 返利类型 | ||||
TikTokTeamSubsidyList []map[string]string `json:"tik_tok_team_subsidy_list"` | TikTokTeamSubsidyList []map[string]string `json:"tik_tok_team_subsidy_list"` | ||||
ToExtendList map[string]string `json:"to_extend_list"` // | ToExtendList map[string]string `json:"to_extend_list"` // | ||||
CommonWealthSystem map[string]string `json:"common_wealth_system"` //共富制度比例 | |||||
CommonWealthSystem interface{} `json:"common_wealth_system"` //共富制度比例 | |||||
} | } | ||||
type LvGradePricePublic struct { | type LvGradePricePublic struct { | ||||
@@ -141,13 +141,13 @@ func GetPlanCfg(eg *xorm.Engine, pvd, masterId string, rewardOpts map[string]*mo | |||||
var subsidyTmpPricePublic map[int]*comm_plan.LvGradePricePublic | var subsidyTmpPricePublic map[int]*comm_plan.LvGradePricePublic | ||||
var subsidyTmpWineryAdv map[int]*comm_plan.LvGradeWineryAdv | var subsidyTmpWineryAdv map[int]*comm_plan.LvGradeWineryAdv | ||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, "\"bili\":0", "\"bili\":\"0\"") | commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, "\"bili\":0", "\"bili\":\"0\"") | ||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"buy_deliver_list\":[]", "") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"new_team_list\":[]", "") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"new_extend_list\":[]", "") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"second_extend_list\":[]", "") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"to_extend_list\":[]", "") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"common_wealth_system\":[]", "") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"common_wealth_system\":[\"0\"]", "") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"buy_deliver_list\":[]", "\"buy_deliver_list\":{}") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"new_team_list\":[]", "\"new_team_list\":{}") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"new_extend_list\":[]", "\"new_extend_list\":{}") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"second_extend_list\":[]", "\"second_extend_list\":{}") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"to_extend_list\":[]", "\"to_extend_list\":{}") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"common_wealth_system\":[]", "\"common_wealth_system\":{}") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"common_wealth_system\":[\"0\"]", "\"common_wealth_system\":{}") | |||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"to_team_list\":[]", "") | commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, ",\"to_team_list\":[]", "") | ||||
commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, "\"same_extend\":[[]]", "\"same_extend\":[]") | commissionOpt.Data = strings.ReplaceAll(commissionOpt.Data, "\"same_extend\":[[]]", "\"same_extend\":[]") | ||||
if strings.Contains(commissionOpt.Data, "\"subsidy_mode_list\":[") { //兼容旧的方案 | if strings.Contains(commissionOpt.Data, "\"subsidy_mode_list\":[") { //兼容旧的方案 | ||||
@@ -320,7 +320,11 @@ func public(engine *xorm.Engine, ulinkParent *comm_plan.LvUser, cfg *comm_plan.P | |||||
if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 | if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 | ||||
pendingAmount = zhios_order_relate_utils.Float64ToStr(integralFee) | pendingAmount = zhios_order_relate_utils.Float64ToStr(integralFee) | ||||
} | } | ||||
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(grade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) | |||||
CommonWealthSystems, ok := grade.CommonWealthSystem.(map[string]string) | |||||
if ok { | |||||
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(CommonWealthSystems[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) | |||||
} | |||||
} | } | ||||
} | } | ||||
//共富收益处理 | //共富收益处理 | ||||