From 66a637a7c08428071b3052e00ad1e8b9e347f9b2 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 30 May 2024 08:57:14 +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 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/ipad/svc/svc_order_make.go b/app/ipad/svc/svc_order_make.go index a52c52c..1cb479a 100644 --- a/app/ipad/svc/svc_order_make.go +++ b/app/ipad/svc/svc_order_make.go @@ -43,6 +43,11 @@ func NewOrderSortingEnd(c *gin.Context) { //修改制作记录 for _, v := range args.OrderInfo { record := db.GetOrderGoods(sess, v["oid"], args.Gid, args.SkuId) + if record.MakeDate > utils.StrToInt(time.Now().Format("20060102")) { + sess.Rollback() + e.OutErr(c, 400, e.NewErr(400, v["oid"]+",未到制作时间,请勿提交")) + return + } record.SuccessNum += utils.StrToInt(v["num"]) if record.SuccessNum >= record.Num { record.State = 4 @@ -111,6 +116,11 @@ func commNewMake(c *gin.Context, args map[string]string) { e.OutErr(c, 400, e.NewErr(400, "订单查找失败,请重试")) return } + if orderGoods.MakeDate > utils.StrToInt(time.Now().Format("20060102")) { + sess.Rollback() + e.OutErr(c, 400, e.NewErr(400, "该订单未到制作时间,请勿提交")) + return + } WaitMakeNum := orderGoods.WaitMakeNum if state == 2 { //制作完成 if utils.StrToInt(args["num"]) > orderGoods.WaitMakeNum {