Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop
This commit is contained in:
@@ -1175,7 +1175,15 @@ func updateOrCreateSkuVendorCategoryMap(db *dao.DaoDB, ctx *jxcontext.Context, n
|
||||
if skuNameExt.JdCategoryID != "" {
|
||||
updateOrCreate(model.VendorIDJD, nameID, skuNameExt.JdCategoryID)
|
||||
flag = true
|
||||
}
|
||||
} /*else {
|
||||
handler, _ := partner.GetPurchasePlatformFromVendorID(model.VendorIDJD).(partner.IPurchasePlatformStoreSkuHandler)
|
||||
vendorCategoryId, _ := handler.GetSkuCategoryIdByName(beego.AppConfig.DefaultString("jdOrgCode", "320406"), skuNameExt.Name)
|
||||
if vendorCategoryId != "" {
|
||||
updateOrCreate(model.VendorIDJD, nameID, skuNameExt.JdCategoryID)
|
||||
flag = true
|
||||
}
|
||||
}*/
|
||||
|
||||
if skuNameExt.JdsCategoryID != "" {
|
||||
updateOrCreate(model.VendorIDJDShop, nameID, skuNameExt.JdsCategoryID)
|
||||
flag = true
|
||||
@@ -1187,16 +1195,33 @@ func updateOrCreateSkuVendorCategoryMap(db *dao.DaoDB, ctx *jxcontext.Context, n
|
||||
if skuNameExt.MtwmCategoryID != "" {
|
||||
updateOrCreate(model.VendorIDMTWM, nameID, skuNameExt.MtwmCategoryID)
|
||||
flag = true
|
||||
} else {
|
||||
|
||||
}
|
||||
if skuNameExt.DdCategoryID != "" {
|
||||
updateOrCreate(model.VendorIDDD, nameID, skuNameExt.DdCategoryID)
|
||||
flag = true
|
||||
}
|
||||
} /*else {
|
||||
handler, _ := partner.GetPurchasePlatformFromVendorID(model.VendorIDDD).(partner.IPurchasePlatformStoreSkuHandler)
|
||||
imgs := fmt.Sprintf("%s|%s|%s|%s|%s|%s", skuNameExt.DescImg, skuNameExt.Img, skuNameExt.Img2, skuNameExt.Img3, skuNameExt.Img4, skuNameExt.Img5)
|
||||
vendorCategoryId, _ := handler.GetSkuCategoryIdByName("57939570", imgs)
|
||||
if vendorCategoryId != "" {
|
||||
updateOrCreate(model.VendorIDDD, nameID, skuNameExt.JdCategoryID)
|
||||
flag = true
|
||||
}
|
||||
}*/
|
||||
} else {
|
||||
if payload["jdCategoryID"] != nil {
|
||||
updateOrCreate(model.VendorIDJD, nameID, payload["jdCategoryID"].(string))
|
||||
flag = true
|
||||
}
|
||||
} /*else {
|
||||
handler, _ := partner.GetPurchasePlatformFromVendorID(model.VendorIDJD).(partner.IPurchasePlatformStoreSkuHandler)
|
||||
vendorCategoryId, _ := handler.GetSkuCategoryIdByName(beego.AppConfig.DefaultString("jdOrgCode", "320406"), skuNameExt.Name)
|
||||
if vendorCategoryId != "" {
|
||||
updateOrCreate(model.VendorIDJD, nameID, skuNameExt.JdCategoryID)
|
||||
flag = true
|
||||
}
|
||||
}*/
|
||||
if payload["jdsCategoryID"] != nil {
|
||||
updateOrCreate(model.VendorIDJDShop, nameID, payload["jdsCategoryID"].(string))
|
||||
flag = true
|
||||
@@ -1212,7 +1237,15 @@ func updateOrCreateSkuVendorCategoryMap(db *dao.DaoDB, ctx *jxcontext.Context, n
|
||||
if payload["ddCategoryID"] != nil {
|
||||
updateOrCreate(model.VendorIDDD, nameID, payload["ddCategoryID"].(string))
|
||||
flag = true
|
||||
}
|
||||
} /*else {
|
||||
handler, _ := partner.GetPurchasePlatformFromVendorID(model.VendorIDDD).(partner.IPurchasePlatformStoreSkuHandler)
|
||||
imgs := fmt.Sprintf("%s,%s,%s,%s,%s,%s", skuNameExt.DescImg, skuNameExt.Img, skuNameExt.Img2, skuNameExt.Img3, skuNameExt.Img4, skuNameExt.Img5)
|
||||
vendorCategoryId, _ := handler.GetSkuCategoryIdByName("57939570", imgs)
|
||||
if vendorCategoryId != "" {
|
||||
updateOrCreate(model.VendorIDDD, nameID, skuNameExt.JdCategoryID)
|
||||
flag = true
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
return flag
|
||||
|
||||
Reference in New Issue
Block a user