From 24a69031fda813e8cdcf148dd9622776023c3c6a Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 12 Apr 2024 10:57:15 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=88=B6=E4=BD=9C=E6=B5=81=E7=A8=8B=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ipad/svc/svc_order_make.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/ipad/svc/svc_order_make.go b/app/ipad/svc/svc_order_make.go index 59861d6..e0173e0 100644 --- a/app/ipad/svc/svc_order_make.go +++ b/app/ipad/svc/svc_order_make.go @@ -222,6 +222,15 @@ func NewOrderSortingEnd(c *gin.Context) { e.OutErr(c, 400, e.NewErr(400, "提交失败,请重试")) return } + makeRecord := db.GetOrderGoodsMakeStock(sess, utils.StrToInt64(args.Gid), utils.StrToInt64(args.SkuId)) + makeRecord.WaitSortingNum -= utils.StrToInt(v["num"]) + makeRecord.SuccessNum += utils.StrToInt(v["num"]) + _, err = sess.Where("id=?", makeRecord.Id).Cols("success_num,wait_sorting_num").Update(makeRecord) + if err != nil { + sess.Rollback() + e.OutErr(c, 400, e.NewErr(400, "提交失败,请重试")) + return + } //写入流程记录 var recordFlow = &model.OrderGoodsDoingFlow{ Num: record.Num,