物料订单一周申请一次改为袋子一周申请一次

This commit is contained in:
苏尹岚
2020-04-22 16:43:44 +08:00
parent f4876695d1
commit 0e88eec059

View File

@@ -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