- StoreSkuSyncInfo中添加VendorVendorCatID2,VendorVendorCatID3
This commit is contained in:
@@ -57,7 +57,9 @@ type StoreSkuSyncInfo struct {
|
||||
Img string
|
||||
DescImg string
|
||||
|
||||
VendorVendorCatID int64 `orm:"column(vendor_vendor_cat_id)"` // 平台商品分类
|
||||
VendorVendorCatID int64 `orm:"column(vendor_vendor_cat_id)"` // 平台商品分类(叶子结点)
|
||||
VendorVendorCatID2 int64 `orm:"column(vendor_vendor_cat_id2)"` // 平台商品分类上一级
|
||||
VendorVendorCatID3 int64 `orm:"column(vendor_vendor_cat_id3)"` // 平台商品分类再上一级
|
||||
|
||||
// sku的商家分类信息
|
||||
SkuStoreCatSyncStatus int8
|
||||
@@ -163,6 +165,10 @@ func GetStoreSkus(db *DaoDB, vendorID, storeID int, skuIDs []int) (skus []*Store
|
||||
tableName, fieldPrefix, fieldPrefix, vendorSkuNameField, GetImgFieldName(vendorID), GetImgFieldName(vendorID), GetDescImgFieldName(vendorID),
|
||||
fieldPrefix, fieldPrefix,
|
||||
}
|
||||
if vendorID == model.VendorIDEBAI {
|
||||
sql += `,
|
||||
t4vp.vendor_category_id vendor_vendor_cat_id2, t4vp.parent_id vendor_vendor_cat_id3`
|
||||
}
|
||||
if isSingleStorePF {
|
||||
sql += `,
|
||||
t5.%s_sync_status store_cat_sync_status, t5.%s_id vendor_cat_id,
|
||||
@@ -181,6 +187,13 @@ func GetStoreSkus(db *DaoDB, vendorID, storeID int, skuIDs []int) (skus []*Store
|
||||
model.SkuStatusNormal,
|
||||
utils.DefaultTimeValue,
|
||||
}
|
||||
if vendorID == model.VendorIDEBAI {
|
||||
sql += `
|
||||
LEFT JOIN sku_vendor_category t4v ON t4v.vendor_category_id = t4.%s_category_id AND t4v.vendor_id = ?
|
||||
LEFT JOIN sku_vendor_category t4vp ON t4vp.vendor_category_id = t4v.parent_id AND t4v.vendor_id = ?`
|
||||
fmtParams = append(fmtParams, fieldPrefix)
|
||||
sqlParams = append(sqlParams, vendorID, vendorID)
|
||||
}
|
||||
if isSingleStorePF {
|
||||
sql += `
|
||||
LEFT JOIN store_sku_category_map t5 ON t4.id = t5.category_id AND t5.store_id = t1.store_id AND t5.deleted_at = ?
|
||||
|
||||
Reference in New Issue
Block a user