diff --git a/svc/public_platoon_relate_commission.go b/svc/public_platoon_relate_commission.go index 94248c3..b161a78 100644 --- a/svc/public_platoon_relate_commission.go +++ b/svc/public_platoon_relate_commission.go @@ -58,12 +58,15 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId var directPush = make(map[string]string) var selfRateList = make(map[string]string) var commonWealthSystem = make(map[string]string) + var pendingAmount = param.PendingAmount for _, coinId := range lvGrade.ReturnType { - selfRateList[coinId] = zhios_order_relate_utils.Float64ToStrPrec4(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100) - commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrPrec4(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100) - directPush[coinId] = zhios_order_relate_utils.Float64ToStrPrec4(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(param.PendingAmount) / 100) + if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 + pendingAmount = param.PendingIntegral + } + selfRateList[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) } - //TODO::本次消费产生的共富收益给到谁 var nowBenefitUid string userPublicPlatoonRelation, err := db.UserPublicPlatoonRelationGetOneByParams(engine, map[string]interface{}{ @@ -118,6 +121,7 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId CommonWealthBenefitUid: nowBenefitUid, DirectPushBenefitUid: strconv.Itoa(userPublicPlatoonRelation.RecommendUid), PendingAmount: param.PendingAmount, + PendingIntegral: param.PendingIntegral, Oid: param.Oid, SelfRateList: selfRateList, CommonWealthSystem: commonWealthSystem,