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