From 208ee471d159186ecdd62d4c1460376f46c88413 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 18 Jun 2024 10:33:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ipad/svc/svc_order_make.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/ipad/svc/svc_order_make.go b/app/ipad/svc/svc_order_make.go index f621472..9514d1a 100644 --- a/app/ipad/svc/svc_order_make.go +++ b/app/ipad/svc/svc_order_make.go @@ -51,6 +51,11 @@ func NewOrderSortingEnd(c *gin.Context) { e.OutErr(c, 400, e.NewErr(400, v["oid"]+",未到制作时间,请勿提交")) return } + if utils.StrToInt(v["num"]) > record.Num-record.SuccessNum { + sess.Rollback() + e.OutErr(c, 400, e.NewErr(400, record.GoodsTitle+",数量只能提交"+utils.IntToStr(record.Num-record.SuccessNum)+"个")) + return + } record.SuccessNum += utils.StrToInt(v["num"]) if record.SuccessNum >= record.Num { record.State = 4