- 新版同步逻辑基本OK
This commit is contained in:
@@ -150,11 +150,18 @@ func AddStoreCategoryMap(db *DaoDB, storeID, categoryID int, vendorID int, vendo
|
||||
if err = GetEntity(db, storeCat, model.FieldStoreID, model.FieldCategoryID, model.FieldDeletedAt); err != nil && err != orm.ErrNoRows {
|
||||
return err
|
||||
}
|
||||
if vendorID == model.VendorIDEBAI {
|
||||
if vendorCategoryID != "" {
|
||||
storeCat.EbaiID = utils.Str2Int64(vendorCategoryID)
|
||||
if vendorID == model.VendorIDMTWM {
|
||||
storeCat.MtwmID = vendorCategoryID
|
||||
storeCat.MtwmSyncStatus = status
|
||||
} else if vendorID == model.VendorIDEBAI || vendorID == model.VendorIDWSC {
|
||||
intVendorCategoryID := utils.Str2Int64WithDefault(vendorCategoryID, 0)
|
||||
if vendorID == model.VendorIDEBAI {
|
||||
storeCat.EbaiID = intVendorCategoryID
|
||||
storeCat.EbaiSyncStatus = status
|
||||
} else {
|
||||
storeCat.WscID = intVendorCategoryID
|
||||
storeCat.WscSyncStatus = status
|
||||
}
|
||||
storeCat.EbaiSyncStatus = status
|
||||
} else {
|
||||
panic("unsupported vendor")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user