diff --git a/svc/public_platoon_relate_commission.go b/svc/public_platoon_relate_commission.go index 16e6f6b..be2b611 100644 --- a/svc/public_platoon_relate_commission.go +++ b/svc/public_platoon_relate_commission.go @@ -56,9 +56,9 @@ func BatchGetPublicPlatoonRelateCommissionByOrder(engine *xorm.Engine, masterId 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) + selfRateList[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) + commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) + directPush[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } nowBenefitUid, _, err := benefitUidByBig(engine, param) @@ -187,7 +187,7 @@ func BatchGetPublicPlatoonRelateCommissionByOrderLevel(engine *xorm.Engine, mast 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) + selfRateList[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } nowBenefitUid, _, err := benefitUidByBig(engine, param) @@ -209,7 +209,7 @@ func BatchGetPublicPlatoonRelateCommissionByOrderLevel(engine *xorm.Engine, mast if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 pendingAmount = param.PendingIntegral } - directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + directPush[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } } @@ -223,7 +223,7 @@ func BatchGetPublicPlatoonRelateCommissionByOrderLevel(engine *xorm.Engine, mast if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 pendingAmount = param.PendingIntegral } - commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } } diff --git a/svc/small_public_platoon_relate_commission.go b/svc/small_public_platoon_relate_commission.go index 1a33d46..027368e 100644 --- a/svc/small_public_platoon_relate_commission.go +++ b/svc/small_public_platoon_relate_commission.go @@ -58,9 +58,9 @@ func BatchSmallGetPublicPlatoonRelateCommission(engine *xorm.Engine, masterId st 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) + selfRateList[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) + commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) + directPush[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } @@ -399,7 +399,7 @@ func BatchSmallGetPublicPlatoonRelateCommissionLevel(engine *xorm.Engine, master 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) + selfRateList[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.SelfRateList[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } //TODO::本次消费产生的共富收益给到谁 @@ -422,7 +422,7 @@ func BatchSmallGetPublicPlatoonRelateCommissionLevel(engine *xorm.Engine, master if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 pendingAmount = param.PendingIntegral } - directPush[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + directPush[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.DirectPush[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } } @@ -436,7 +436,7 @@ func BatchSmallGetPublicPlatoonRelateCommissionLevel(engine *xorm.Engine, master if zhios_order_relate_utils.StrToInt(coinId) > 0 { //积分更换基数 pendingAmount = param.PendingIntegral } - commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStr(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId]) * zhios_order_relate_utils.StrToFloat64(pendingAmount) / 100) + commonWealthSystem[coinId] = zhios_order_relate_utils.Float64ToStrByPrec(zhios_order_relate_utils.StrToFloat64(lvGrade.CommonWealthSystem[coinId])*zhios_order_relate_utils.StrToFloat64(pendingAmount)/100, 9) } } }