|
|
@@ -10,6 +10,7 @@ import ( |
|
|
|
"errors" |
|
|
|
"fmt" |
|
|
|
"github.com/jinzhu/copier" |
|
|
|
"github.com/shopspring/decimal" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
@@ -481,7 +482,7 @@ func CommFee(fee float64, opt *comm_plan.PlanOpt, types, isGoods string) (float6 |
|
|
|
orderBeforeRate := fee * opt.OrderBeforeRate |
|
|
|
fee1 := int64(fee*1e4) - int64(orderBeforeRate*1e4) |
|
|
|
if opt.PointType == 1 { //四舍五入 |
|
|
|
fee = zhios_order_relate_utils.FloatFormat(float64(fee1)/1e4, 2) |
|
|
|
fee, _ = decimal.NewFromFloat(float64(fee1) / 10000).Round(2).Float64() |
|
|
|
} else { |
|
|
|
fee = float64(int64(float64(fee1)/100)) / 100 |
|
|
|
} |
|
|
|