1
This commit is contained in:
@@ -161,7 +161,6 @@ func (p *PurchaseHandler) GetVendorCategories(ctx *jxcontext.Context) (vendorCat
|
||||
}
|
||||
|
||||
func skuInfo2Param(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (param *jdapi.OpSkuParam) {
|
||||
db := dao.GetDB()
|
||||
param = &jdapi.OpSkuParam{
|
||||
TraceID: ctx.GetTrackInfo(),
|
||||
OutSkuID: utils.Int2Str(sku.SkuID),
|
||||
@@ -189,8 +188,6 @@ func skuInfo2Param(ctx *jxcontext.Context, sku *dao.StoreSkuSyncInfo) (param *jd
|
||||
param.CategoryID = utils.Str2Int64(sku.SkuVendorMapCatID)
|
||||
} else if sku.VendorVendorCatID != 0 {
|
||||
param.CategoryID = sku.VendorVendorCatID
|
||||
dao.ExecuteSQL(db, ` UPDATE sku_vendor_category_map SET vendor_category_id = ? WHERE name_id = ? AND vendor_id = ? `, []interface{}{sku.VendorVendorCatID, sku.NameID, sku.VendorID}...)
|
||||
//dao.ExecuteSQL(dao.GetDB(), ` UPDATE sku_name SET jd_category_id = ? WHERE id = ? `, []interface{}{sku.VendorVendorCatID, sku.NameID})
|
||||
}
|
||||
// 京东强制要求upc的商品,如果没有设置upc,自动生成一个假的
|
||||
if param.Upc == "" && isSkuMustHaveUpc(sku.Unit, param.CategoryID) {
|
||||
@@ -242,6 +239,7 @@ func (p *PurchaseHandler) CreateSku2(ctx *jxcontext.Context, sku *dao.StoreSkuSy
|
||||
} else {
|
||||
dao.UpdateEntity(dao.GetDB(), skuVendorCategory, "VendorCategoryID")
|
||||
}
|
||||
err = nil
|
||||
}
|
||||
//dao.ExecuteSQL(dao.GetDB(), ` UPDATE sku_category SET jd_category_id = ? WHERE id = ? `, []interface{}{recommendCategory.CategoryId, sku.LocalCategoryId}...)
|
||||
//dao.ExecuteSQL(dao.GetDB(), ` UPDATE sku_name SET jd_category_id = ? WHERE id = ? `, []interface{}{recommendCategory.CategoryId, sku.NameID})
|
||||
|
||||
Reference in New Issue
Block a user