增加商品额外前缀
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
SkuCategoryNormal = 0
|
||||
SkuCategorySpecial = 1
|
||||
@@ -166,8 +168,12 @@ func (*SkuCategory) TableIndex() [][]string {
|
||||
type SkuName struct {
|
||||
ModelIDCULD
|
||||
|
||||
Prefix string `orm:"size(255)" json:"prefix"`
|
||||
Name string `orm:"size(255);index" json:"name"`
|
||||
Prefix string `orm:"size(255)" json:"prefix"`
|
||||
Name string `orm:"size(255);index" json:"name"`
|
||||
ExPrefix string `orm:"size(255)" json:"exPrefix"`
|
||||
|
||||
ExPrefixBegin time.Time `orm:"type(datetime);null" json:"exPrefixBegin"`
|
||||
ExPrefixEnd time.Time `orm:"type(datetime);null" json:"exPrefixEnd"`
|
||||
|
||||
BrandID int `orm:"column(brand_id);default(0)" json:"brandID"` // todo,此属性暂时没有使用,且有问题,应该是不同平台都有一个brandid
|
||||
CategoryID int `orm:"column(category_id);index" json:"categoryID"` // 标准类别
|
||||
@@ -255,9 +261,9 @@ type SkuWithVendor struct {
|
||||
|
||||
type SkuNameExt struct {
|
||||
SkuName
|
||||
Skus []*SkuWithVendor `orm:"-" json:"skus"`
|
||||
SkusStr string `json:"-"`
|
||||
|
||||
Places []int `orm:"-" json:"places"`
|
||||
PlacesStr string `json:"-"`
|
||||
Skus []*SkuWithVendor `orm:"-" json:"skus"`
|
||||
SkusStr string `json:"-"`
|
||||
FullName string `json:"fullName"`
|
||||
Places []int `orm:"-" json:"places"`
|
||||
PlacesStr string `json:"-"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user