1
This commit is contained in:
@@ -1162,11 +1162,11 @@ func getCategoryByName(name string) string {
|
||||
handler, _ := partner.GetPurchasePlatformFromVendorID(model.VendorIDJD).(partner.IPurchasePlatformStoreSkuHandler)
|
||||
vendorOrgCode := ""
|
||||
if beego.BConfig.RunMode == model.ServerTypeFruits {
|
||||
vendorOrgCode = "339032"
|
||||
vendorOrgCode = jdapi.JdVendorOrgCodeFruit
|
||||
} else if beego.BConfig.RunMode == model.ServerTypePet {
|
||||
vendorOrgCode = "390558"
|
||||
vendorOrgCode = jdapi.JdVendorOrgCodePet
|
||||
} else {
|
||||
vendorOrgCode = "320406"
|
||||
vendorOrgCode = jdapi.JdVendorOrgCodeVagetable
|
||||
}
|
||||
vendorCategoryId, _ := handler.GetSkuCategoryIdByName(vendorOrgCode, name)
|
||||
return vendorCategoryId
|
||||
@@ -1909,11 +1909,11 @@ func GetJdUpcCodeByCode(ctx *jxcontext.Context, upcCode string) (productInfos []
|
||||
func GetJdUpcCodeByName(ctx *jxcontext.Context, name, upcCode string) (productInfos []*jdapi.ProductInfo, err error) {
|
||||
appOrgCode := ""
|
||||
if beego.BConfig.RunMode == model.ServerTypeFruits {
|
||||
appOrgCode = "339032"
|
||||
appOrgCode = jdapi.JdVendorOrgCodeFruit
|
||||
} else if beego.BConfig.RunMode == model.ServerTypePet {
|
||||
appOrgCode = "390558"
|
||||
appOrgCode = jdapi.JdVendorOrgCodePet
|
||||
} else {
|
||||
appOrgCode = "320406"
|
||||
appOrgCode = jdapi.JdVendorOrgCodeVagetable
|
||||
}
|
||||
var (
|
||||
apijd = apimanager.CurAPIManager.GetAPI(model.VendorIDJD, appOrgCode).(*jdapi.API)
|
||||
@@ -3542,12 +3542,12 @@ func GetSkuNamesNew(ctx *jxcontext.Context, keyword string, skuIDs, skuNameIDs [
|
||||
t2.id sku_id
|
||||
FROM sku_name t1
|
||||
LEFT JOIN sku t2 ON t1.id = t2.name_id AND t2.deleted_at = ?
|
||||
LEFT JOIN thing_map t3 ON t3.thing_id = t2.id AND t3.thing_type = ? AND t3.vendor_org_code = ? AND t3.deleted_at = ?
|
||||
LEFT JOIN thing_map t3 ON t3.thing_id = t2.id AND t3.thing_type = ? AND t3.vendor_org_code IN (?,?,?) AND t3.deleted_at = ?
|
||||
WHERE t1.deleted_at = ?
|
||||
`
|
||||
}
|
||||
sqlParams := []interface{}{
|
||||
utils.DefaultTimeValue, utils.DefaultTimeValue, model.ThingTypeSku, "320406", utils.DefaultTimeValue,
|
||||
utils.DefaultTimeValue, utils.DefaultTimeValue, model.ThingTypeSku, "320406", "390558", "339032", utils.DefaultTimeValue,
|
||||
}
|
||||
if keyword != "" {
|
||||
keywordLike := "%" + keyword + "%"
|
||||
|
||||
Reference in New Issue
Block a user