From 4716d41afcb1122b98bca81feae6eeb1c22f87dc Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 16 Apr 2024 14:24:37 +0800 Subject: [PATCH] =?UTF-8?q?1ipad=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/db/db_order_goods_list.go | 2 +- app/ipad/svc/svc_order_make.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/db/db_order_goods_list.go b/app/db/db_order_goods_list.go index 5eff185..cb92f13 100644 --- a/app/db/db_order_goods_list.go +++ b/app/db/db_order_goods_list.go @@ -8,7 +8,7 @@ import ( func GetOrderGoodsListByIpad(eg *xorm.Engine, param map[string]string) (*[]model.OrderGoods, int64) { var order []model.OrderGoods - sess := eg.Where("state!=5") + sess := eg.Where("state!=5 and num!=success_num") if param["oid"] != "" { sess.And("oid = ?", param["oid"]) diff --git a/app/ipad/svc/svc_order_make.go b/app/ipad/svc/svc_order_make.go index 5836584..061d75f 100644 --- a/app/ipad/svc/svc_order_make.go +++ b/app/ipad/svc/svc_order_make.go @@ -210,8 +210,8 @@ func NewOrderSortingEnd(c *gin.Context) { //修改制作记录 for _, v := range args.OrderInfo { record := db.GetOrderGoods(sess, v["oid"], args.Gid, args.SkuId) - record.SuccessNum = utils.StrToInt(v["num"]) - if utils.StrToInt(v["num"]) == record.Num { + record.SuccessNum += utils.StrToInt(v["num"]) + if record.SuccessNum >= record.Num { record.State = 4 } record.AdminId = utils.StrToInt(args.AdminId)