From e4e80d56512ef92f09ef47447a0b83095fa6cc9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 21 Jul 2020 15:40:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=AC=E4=B8=9C=E5=94=AE=E5=89=8D=E5=88=A0?= =?UTF-8?q?=E9=99=A4simple?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index f2d63fd9c..4ac575aff 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1410,6 +1410,12 @@ func AdjustJdsOrderSimple(ctx *jxcontext.Context, vendorOrderID string, skuID in if len(orderSkus) == 0 { return fmt.Errorf("未查询到该订单商品!") } - + orderSku := orderSkus[0] + if orderSku.Count > 1 { + orderSku.Count-- + _, err = dao.UpdateEntity(db, orderSku, "Count") + } else { + _, err = dao.DeleteEntity(db, orderSku) + } return err }