diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 0b73b2a2e..465b8cc95 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -641,8 +641,10 @@ func getMapCenter(storeList []*StoreExt) (lng, lat float64) { } func GetVendorStore(ctx *jxcontext.Context, vendorID int, vendorOrgCode, vendorStoreID string) (retVal *StoreExt, err error) { + if vendorID == model.VendorIDJDShop && vendorStoreID == model.JdShopMainVendorStoreID { + return nil, err + } if handler := CurVendorSync.GetStoreHandler(vendorID); handler != nil { - fmt.Println("test1", handler) result, err2 := handler.ReadStore(ctx, vendorOrgCode, vendorStoreID) if err = err2; err == nil { retVal = &StoreExt{ diff --git a/business/model/store.go b/business/model/store.go index 06e1f4250..ce942a06f 100644 --- a/business/model/store.go +++ b/business/model/store.go @@ -56,8 +56,9 @@ const ( ) const ( - ExdStoreName = "饿鲜达" - MatterStoreID = 666666 + ExdStoreName = "饿鲜达" + MatterStoreID = 666666 + JdShopMainVendorStoreID = "999999" ) var ( diff --git a/business/model/store_sku.go b/business/model/store_sku.go index 719a34b37..563369660 100644 --- a/business/model/store_sku.go +++ b/business/model/store_sku.go @@ -52,8 +52,10 @@ type StoreSkuCategoryMap struct { EbaiSyncStatus int8 `orm:"default(2)"` MtwmSyncStatus int8 `orm:"default(2)"` // WscSyncStatus int8 `orm:"default(2)"` - YbID int64 `orm:"column(yb_id);index"` - YbSyncStatus int8 `orm:"default(2)"` + YbID int64 `orm:"column(yb_id);index"` + YbSyncStatus int8 `orm:"default(2)"` + JdsID int64 `orm:"column(jds_id);index"` + JdsSyncStatus int8 `orm:"default(2)"` } func (*StoreSkuCategoryMap) TableUnique() [][]string { diff --git a/business/partner/purchase/jdshop/store_sku.go b/business/partner/purchase/jdshop/store_sku.go index 3e065e028..fd78cf265 100644 --- a/business/partner/purchase/jdshop/store_sku.go +++ b/business/partner/purchase/jdshop/store_sku.go @@ -19,21 +19,21 @@ var ( ) func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) { - if globals.EnableJdShopWrite { + if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID { } return failedList, err } func (p *PurchaseHandler) UpdateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) { - if globals.EnableJdShopWrite { + if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID { } return failedList, err } func (p *PurchaseHandler) DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*partner.StoreSkuInfo) (failedList []*partner.StoreSkuInfoWithErr, err error) { - if globals.EnableJdShopWrite { + if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID { } return failedList, err @@ -70,21 +70,21 @@ func (p *PurchaseHandler) GetStoreAllCategories(ctx *jxcontext.Context, storeID } func (p *PurchaseHandler) CreateStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeCat *dao.SkuStoreCatInfo) (err error) { - if globals.EnableJdShopWrite { + if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID { } return err } func (p *PurchaseHandler) UpdateStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeCat *dao.SkuStoreCatInfo) (err error) { - if globals.EnableJdShopWrite { + if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID { } return err } func (p *PurchaseHandler) DeleteStoreCategory(ctx *jxcontext.Context, storeID int, vendorStoreID, vendorCatID string, level int) (err error) { - if globals.EnableJdShopWrite { + if globals.EnableJdShopWrite && vendorStoreID == model.JdShopMainVendorStoreID { } return err