diff --git a/rule/self_buy_global.go b/rule/self_buy_global.go index c36741d..17be563 100644 --- a/rule/self_buy_global.go +++ b/rule/self_buy_global.go @@ -236,6 +236,10 @@ func OneDoing(sess *xorm.Session, data model.MallOrdCapitalPoolTotal, oneMoney, Num := zhios_order_relate_utils.StrToFloat64(data.LeavePrice) / minMoney if strings.Contains(zhios_order_relate_utils.Float64ToStr(Num), ".") { data.Num = int(Num) + 1 + firstNum := int(zhios_order_relate_utils.StrToFloat64(data.OtherPrice) / minMoney) + if data.Num > firstNum { + data.Num = firstNum + } } else { data.Num = int(Num) }