huangjiajun преди 1 година
родител
ревизия
fdf556b646
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  1. +2
    -1
      svc/reward_commission.go

+ 2
- 1
svc/reward_commission.go Целия файл

@@ -480,8 +480,9 @@ func CommFee(fee float64, opt *comm_plan.PlanOpt, types, isGoods string) (float6

if isGoods == "1" {
orderBeforeRate := fee * opt.OrderBeforeRate
orderBeforeRateFirst := feeFirst * opt.OrderBeforeRate
fee1 := int64(fee*1e4) - int64(orderBeforeRate*1e4)
feeFirst1 := int64(feeFirst*1e4) - int64(orderBeforeRate*1e4)
feeFirst1 := int64(feeFirst*1e4) - int64(orderBeforeRateFirst*1e4)
if opt.PointType == 1 { //四舍五入
fee, _ = decimal.NewFromFloat(float64(fee1) / 10000).Round(2).Float64()
feeFirst, _ = decimal.NewFromFloat(float64(feeFirst1) / 10000).Round(2).Float64()


Зареждане…
Отказ
Запис