绑定京东上层门店

This commit is contained in:
苏尹岚
2020-05-22 08:50:12 +08:00
parent f74b24c83c
commit 1fa9621431

View File

@@ -1176,7 +1176,6 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
}
} else if vendorID == model.VendorIDJDShop {
if storeMap.VendorStoreID == "" {
fmt.Println("testadd")
storeMap.SyncStatus = model.SyncFlagNewMask //京东商城要去建店
} else {
if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil {
@@ -1199,7 +1198,6 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
if len(storeMapList) > 0 {
_, err = CurVendorSync.SyncStore(ctx, db, storeMap.VendorID, storeID, false, userName)
} else {
fmt.Println("testadd2")
if err == nil {
dao.WrapAddIDCULDEntity(storeMap, userName)
if db == nil {
@@ -1212,9 +1210,11 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
panic(r)
}
}()
fmt.Println("test111")
if err = dao.CreateEntity(db, storeMap); err == nil {
dao.Commit(db)
outStoreMap = storeMap
fmt.Println("test222")
_, err = CurVendorSync.SyncStore(ctx, db, storeMap.VendorID, storeID, false, userName)
} else {
dao.Rollback(db)
@@ -3174,6 +3174,5 @@ func findSkusBetweenJdsMainStore(db *dao.DaoDB, storeID int) (skus []int) {
skus = append(skus, v.SkuID)
}
}
fmt.Println("testskus", skus)
return skus
}