|
|
@@ -7,6 +7,7 @@ import ( |
|
|
|
zhios_order_relate_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils" |
|
|
|
"errors" |
|
|
|
"github.com/jinzhu/copier" |
|
|
|
"strings" |
|
|
|
"time" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
@@ -229,7 +230,12 @@ func OneDoing(sess *xorm.Session, data model.MallOrdCapitalPoolTotal, oneMoney, |
|
|
|
} |
|
|
|
//剩余有钱 并且是普通商品的 还有普通商品的金额大于最小分配金额 |
|
|
|
if zhios_order_relate_utils.StrToFloat64(data.LeavePrice) > 0 && data.Type == 0 && zhios_order_relate_utils.StrToFloat64(data.OtherPrice) >= minMoney { |
|
|
|
data.Num = int(zhios_order_relate_utils.StrToFloat64(data.LeavePrice) / minMoney) |
|
|
|
Num := zhios_order_relate_utils.StrToFloat64(data.LeavePrice) / minMoney |
|
|
|
if strings.Contains(zhios_order_relate_utils.Float64ToStr(Num), ".") { |
|
|
|
data.Num = int(Num) + 1 |
|
|
|
} else { |
|
|
|
data.Num = int(Num) |
|
|
|
} |
|
|
|
if data.Num == 0 { |
|
|
|
data.Num = 1 |
|
|
|
} |
|
|
|