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