|
|
@@ -218,12 +218,33 @@ func BatchGetPublicPlatoonRelateCommissionByOrderLevel(engine *xorm.Engine, mast |
|
|
|
parentUid, _ := db.UserFindByID(engine, nowBenefitUid) |
|
|
|
lvGrade := subsidyTmp[zhios_order_relate_utils.IntToStr(parentUid.Level)] |
|
|
|
if lvGrade != nil { |
|
|
|
//判断购买人是哪个等级 |
|
|
|
UserLvUpPublicPlatoonList := make(map[string]interface{}) |
|
|
|
if len(lvGrade.UserLvUpPublicPlatoonList) > 0 { |
|
|
|
for _, v1 := range lvGrade.UserLvUpPublicPlatoonList { |
|
|
|
v2 := v1.(map[string]interface{}) |
|
|
|
if zhios_order_relate_utils.AnyToInt64(v2["lv"]) == zhios_order_relate_utils.StrToInt64(param.UserLevel) { |
|
|
|
rateList, ok := v2["rate_list"].(map[string]interface{}) |
|
|
|
if ok { |
|
|
|
UserLvUpPublicPlatoonList = rateList |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
for _, coinId := range lvGrade.ReturnType { |
|
|
|
var pendingAmount = param.PendingAmount |
|
|
|
if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 |
|
|
|
pendingAmount = param.PendingIntegral |
|
|
|
} |
|
|
|
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) |
|
|
|
bili := lvGrade.CommonWealthSystem[coinId] |
|
|
|
//判断购买人是哪个等级 读对应的比例 |
|
|
|
if UserLvUpPublicPlatoonList != nil { |
|
|
|
newBili, ok := UserLvUpPublicPlatoonList[coinId] |
|
|
|
if ok { |
|
|
|
bili = zhios_order_relate_utils.AnyToString(newBili) |
|
|
|
} |
|
|
|
} |
|
|
|
commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(bili)*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|