From 698f7d599acb2b203b84a40352cc5c8d66c26836 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 12 Jun 2023 12:02:02 +0800 Subject: [PATCH] test --- rule/self_buy_global.go | 4 ++++ 1 file changed, 4 insertions(+) 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) }