From 0e88eec059cde9fddd96764b578d30760864cadc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Wed, 22 Apr 2020 16:43:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=96=99=E8=AE=A2=E5=8D=95=E4=B8=80?= =?UTF-8?q?=E5=91=A8=E7=94=B3=E8=AF=B7=E4=B8=80=E6=AC=A1=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E8=A2=8B=E5=AD=90=E4=B8=80=E5=91=A8=E7=94=B3=E8=AF=B7=E4=B8=80?= =?UTF-8?q?=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/partner/purchase/jx/localjx/order.go | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/business/partner/purchase/jx/localjx/order.go b/business/partner/purchase/jx/localjx/order.go index 5df6895bd..1724eed6f 100644 --- a/business/partner/purchase/jx/localjx/order.go +++ b/business/partner/purchase/jx/localjx/order.go @@ -150,6 +150,13 @@ var ( } regexpCnameAndCmobile = regexp.MustCompile(`配送员,(.*),手机号,(.*)`) + bagSkuMap = map[int]int{ //京西物料袋子skuid + 6039382: 6039382, + 6039383: 6039383, + 6039384: 6039384, + 6039387: 6039387, + 6039390: 6039390, + } ) func init() { @@ -906,11 +913,15 @@ func orderSolutionForWuLiao(order *model.GoodsOrder) (err error) { cms.RefreshMatterStock(jxcontext.AdminCtx, v.SkuID) } } - stores, err := dao.GetStoreList(db, []int{order.FromStoreID}, nil, nil, nil, "") - if len(stores) > 0 { - store := stores[0] - store.IsBoughtMatter = model.YES - dao.UpdateEntity(db, store, "IsBoughtMatter") + for _, v := range order.Skus { + if bagSkuMap[v.SkuID] != 0 { + stores, _ := dao.GetStoreList(db, []int{order.FromStoreID}, nil, nil, nil, "") + if len(stores) > 0 { + store := stores[0] + store.IsBoughtMatter = model.YES + dao.UpdateEntity(db, store, "IsBoughtMatter") + } + } } } return err