增加商品额外前缀

This commit is contained in:
苏尹岚
2019-12-17 17:34:51 +08:00
parent b2994f13cd
commit 9fdae12a66
10 changed files with 146 additions and 19 deletions

View File

@@ -260,7 +260,9 @@ func GetSkusWithVendor(db *DaoDB, vendorIDs []int, appOrgCodes []string, nameIDs
IF(t11.resource_type IS NULL OR t11.resource_type <> ?, t2.img, '') img,
IF(t12.resource_type IS NULL OR t12.resource_type <> ?, t2.img2, '') img2,
t2.desc_img,
t2.ex_prefix,
t2.ex_prefix_begin,
t2.ex_prefix_end,
t3.jd_category_id vendor_vendor_cat_id,
t3m.sync_status cat_sync_status,
@@ -307,7 +309,6 @@ func GetSkusWithVendor(db *DaoDB, vendorIDs []int, appOrgCodes []string, nameIDs
sqlParams = append(sqlParams, skuIDs)
}
sql += " ORDER BY t1.seq"
if err = GetRows(db, &skuList, sql, sqlParams...); err == nil {
skuPlaceList, err2 := GetSkuNamePlaces(db, nameIDs, skuIDs)
if err = err2; err == nil {

View File

@@ -56,7 +56,10 @@ type StoreSkuSyncInfo struct {
model.Sku
// sku_name
Prefix string
Prefix string
ExPrefix string
ExPrefixBegin time.Time
ExPrefixEnd time.Time
// NameID int `orm:"column(name_id)"`
VendorNameID string `orm:"column(vendor_name_id)"` // 暂时无用
Name string
@@ -305,7 +308,7 @@ func newGetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty
%s vendor_sku_id, t1.%s_sync_status sku_sync_status, t1.%s_price vendor_price,
t1.store_id, t1.deleted_at bind_deleted_at,t1.status_sale_begin,t1.status_sale_end,
t2.*,
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc,
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc, t3.ex_prefix, t3.ex_prefix_begin, t3.ex_prefix_end,
IF(t11.%s <> '', t11.%s, t3.img) img,
IF(t12.%s <> '', t12.%s, t3.img2) img2,
t13.%s desc_img,
@@ -410,7 +413,7 @@ func oldGetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty
%s.%s_id vendor_sku_id, t1.%s_sync_status sku_sync_status, t1.%s_price vendor_price,
t1.store_id, t1.deleted_at bind_deleted_at,t1.status_sale_begin,t1.status_sale_end,
t2.*,
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc,
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc,t3.ex_prefix, t3.ex_prefix_begin, t3.ex_prefix_end,
IF(t11.%s <> '', t11.%s, t3.img) img,
IF(t12.%s <> '', t12.%s, t3.img2) img2,
t13.%s desc_img,