删除分类调价比例

This commit is contained in:
gazebo
2019-09-25 10:28:54 +08:00
parent 4e63f526f2
commit 15d16c41a6
6 changed files with 26 additions and 40 deletions

View File

@@ -58,7 +58,7 @@ type StoreSkuSyncInfo struct {
// 平台相关的图片信息
Img string
DescImg string
DescImg string // 饿百是SkuName中的DescImgEbai
VendorVendorCatID int64 `orm:"column(vendor_vendor_cat_id)"` // 平台商品分类(叶子结点)
@@ -75,8 +75,6 @@ type StoreSkuSyncInfo struct {
StoreCatSyncStatus int8
VendorCatID string `orm:"column(vendor_cat_id)"`
CatPricePercentage int
VendorPrice int64
MergedStatus int
SkuName string
@@ -221,11 +219,11 @@ func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, isDirty bool)
t1.%s_sync_status store_sku_sync_status, %s vendor_name_id, t1.store_id, t1.deleted_at bind_deleted_at,
t2.*,
t3.id name_id, t3.prefix, t3.name, t3.unit, IF(t3.%s <> '', t3.%s, t3.img) img, t3.upc, t3.%s desc_img,
t4.%s_category_id vendor_vendor_cat_id, t4.%s_price_percentage cat_price_percentage
t4.%s_category_id vendor_vendor_cat_id
`
fmtParams := []interface{}{
tableName, fieldPrefix, fieldPrefix, vendorSkuNameField, GetImgFieldName(vendorID), GetImgFieldName(vendorID), GetDescImgFieldName(vendorID),
fieldPrefix, fieldPrefix,
tableName, fieldPrefix, fieldPrefix, vendorSkuNameField, GetImgFieldName(vendorID),
GetImgFieldName(vendorID), GetDescImgFieldName(vendorID), fieldPrefix,
}
// if vendorID == model.VendorIDEBAI {
// sql += `,
@@ -312,7 +310,7 @@ func GetFullStoreSkus(db *DaoDB, vendorID, storeID int) (skus []*StoreSkuSyncInf
SELECT t1.id bind_id, t1.price, t1.unit_price, t1.status store_sku_status, t2.%s_id vendor_sku_id,
t1.%s_sync_status store_sku_sync_status, t1.store_id, t1.deleted_at bind_deleted_at,
t2.*, t2.id sku_id,
t3.id name_id, t3.prefix, t3.name, t3.unit, IF(t3.%s <> '', t3.%s, t3.img) img,
t3.id name_id, t3.prefix, t3.name, t3.unit, IF(t3.%s <> '', t3.%s, t3.img) img, t3.upc, t3.desc_img,
t4.%s_category_id vendor_vendor_cat_id,
t4.%s_sync_status store_cat_sync_status, t4.%s_id vendor_cat_id,
t5sku.%s_sync_status sku_store_cat_sync_status, t5sku.%s_id sku_vendor_cat_id

View File

@@ -135,16 +135,12 @@ type SkuCategory struct {
Type int8 `json:"type"` // 类别类型,即是普通类别还是特殊用于做活动的类别
Seq int `json:"seq"`
JdPricePercentage int16 `orm:"default(100)" json:"jdPricePercentage"`
EbaiPricePercentage int16 `orm:"default(100)" json:"ebaiPricePercentage"`
MtwmPricePercentage int16 `orm:"default(100)" json:"mtwmPricePercentage"`
WscPricePercentage int16 `orm:"default(100)" json:"wscPricePercentage"`
JdCategoryID int64 `orm:"column(jd_category_id)" json:"jdCategoryID"` // 这个是指对应的京东商品类别
ElmCategoryID int64 `orm:"column(elm_category_id)" json:"elmCategoryID"` // 这个是指对应的饿了么商品类别
EbaiCategoryID int64 `orm:"column(ebai_category_id)" json:"ebaiCategoryID"` // 这个是指对应的饿百商品类别
MtwmCategoryID int64 `orm:"column(mtwm_category_id)" json:"mtwmCategoryID"` // 这个是指对应的美团外卖商品类别
WscCategoryID int64 `orm:"column(wsc_category_id)" json:"wscCategoryID"` // 这个是指对应的美团外卖商品类别
ElmCategoryID int64 `orm:"column(elm_category_id)" json:"elmCategoryID"` // 这个是指对应的饿了么商品类别
WscCategoryID int64 `orm:"column(wsc_category_id)" json:"wscCategoryID"` // 这个是指对应的美团外卖商品类别
JdID int64 `orm:"column(jd_id);null" json:"jdID"` // 这个是指商家自己的商品类别在京东平台上的ID
JdSyncStatus int8 `orm:"default(2)" json:"jdSyncStatus"`
@@ -201,13 +197,13 @@ type SkuName struct {
ImgEbai string `orm:"size(255)" json:"imgEbai"` // 饿百图片地址
ImgHashCode string `orm:"size(255);index" json:"img_hash_code"`
DescImg string `orm:"size(255)" json:"descImg"` // 商品详情图片描述
DescImgEbai string `orm:"size(255)" json:"descImgEbai"` // 饿百的商品详情图片描述RTF
Upc string `orm:"size(20);index"`
Status int `orm:"default(1)" json:"status"` // skuname状态取值同sku.Status
IsSpu int8 `orm:"column(is_spu)" json:"isSpu"` // 用于指明是否SKUNAME当成SPU
DescImg string `orm:"size(255)" json:"descImg"` // 商品详情图片描述
DescImgEbai string `orm:"size(255)" json:"descImgEbai"` // 饿百的商品详情图片描述RTF
JdID int64 `orm:"column(jd_id);null;index" json:"jdID"`
JdSyncStatus int8 `orm:"default(2)" json:"jdSyncStatus"`