1
This commit is contained in:
@@ -650,6 +650,8 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku, isQueryMidPric
|
|||||||
t1.jds_stock_switch,
|
t1.jds_stock_switch,
|
||||||
t1.preparation_time,
|
t1.preparation_time,
|
||||||
t1.best_seller,
|
t1.best_seller,
|
||||||
|
t1.sell_point,
|
||||||
|
t1.sell_point_times,
|
||||||
t1.tiktok_attribute,
|
t1.tiktok_attribute,
|
||||||
t1.mt_attribute
|
t1.mt_attribute
|
||||||
`
|
`
|
||||||
|
|||||||
@@ -6509,6 +6509,7 @@ func GetVendorStoreSkus(ctx *jxcontext.Context, storeID, vendorID int) (err erro
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CopyMtToJd 复制美团到京东
|
||||||
func CopyMtToJd(ctx *jxcontext.Context, mtStoreID, mtOrgCode, jdStoreID, jdOrgCode string) (err error) {
|
func CopyMtToJd(ctx *jxcontext.Context, mtStoreID, mtOrgCode, jdStoreID, jdOrgCode string) (err error) {
|
||||||
type funcType func(mtID, parentID string, catInfo []*mtwmapi.RetailCategoryInfo)
|
type funcType func(mtID, parentID string, catInfo []*mtwmapi.RetailCategoryInfo)
|
||||||
var (
|
var (
|
||||||
@@ -6616,6 +6617,7 @@ func CopyMtToJd(ctx *jxcontext.Context, mtStoreID, mtOrgCode, jdStoreID, jdOrgCo
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UpdateMtCatToJd 修改美团分类到京东
|
||||||
func UpdateMtCatToJd(ctx *jxcontext.Context, mtCatID, jdCatID string) (err error) {
|
func UpdateMtCatToJd(ctx *jxcontext.Context, mtCatID, jdCatID string) (err error) {
|
||||||
var (
|
var (
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
|
|||||||
@@ -110,6 +110,8 @@ type StoreSkuSyncInfo struct {
|
|||||||
NameCategoryID int `orm:"column(name_category_id)"`
|
NameCategoryID int `orm:"column(name_category_id)"`
|
||||||
TiktokAttribute string `orm:"column(tiktok_attribute)"`
|
TiktokAttribute string `orm:"column(tiktok_attribute)"`
|
||||||
MtAttribute string `orm:"column(mt_attribute)"`
|
MtAttribute string `orm:"column(mt_attribute)"`
|
||||||
|
SellPoint string `orm:"column(sell_point)"` // 目前是美团买点
|
||||||
|
SellPointTimes string `orm:"column(sell_point_times)"` // 目前是美团买点展示时间
|
||||||
YbNameSuffix string //银豹的商品条码后缀
|
YbNameSuffix string //银豹的商品条码后缀
|
||||||
YbBarCode string //银豹的商品条码
|
YbBarCode string //银豹的商品条码
|
||||||
JdsStockSwitch int
|
JdsStockSwitch int
|
||||||
@@ -581,7 +583,7 @@ func GetStoreSkus2(db *DaoDB, vendorID, storeID int, skuIDs []int, mustDirty boo
|
|||||||
t1.store_id, t1.deleted_at bind_deleted_at,t1.status_sale_begin,t1.status_sale_end, t1.jds_ware_id, t1.stock, t1.mt_ladder_box_price,
|
t1.store_id, t1.deleted_at bind_deleted_at,t1.status_sale_begin,t1.status_sale_end, t1.jds_ware_id, t1.stock, t1.mt_ladder_box_price,
|
||||||
t2.*,
|
t2.*,
|
||||||
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc, t3.status name_status, t3.category_id name_category_id, t3.yb_name_suffix,t3.tiktok_attribute,t3.mt_attribute,
|
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc, t3.status name_status, t3.category_id name_category_id, t3.yb_name_suffix,t3.tiktok_attribute,t3.mt_attribute,
|
||||||
t3.jds_stock_switch, t3.preparation_time, t3.img_watermark, t3.ex_vendor_id, t3.img img_origin,t3.upc_brand_name,t3.upc_tiktok_brand_id,
|
t3.sell_point,t3.sell_point_times,t3.jds_stock_switch, t3.preparation_time, t3.img_watermark, t3.ex_vendor_id, t3.img img_origin,t3.upc_brand_name,t3.upc_tiktok_brand_id,
|
||||||
IF(t11.%s <> '', t11.%s, t3.img) img,
|
IF(t11.%s <> '', t11.%s, t3.img) img,
|
||||||
IF(t12.%s <> '', t12.%s, t3.img2) img2,
|
IF(t12.%s <> '', t12.%s, t3.img2) img2,
|
||||||
IF(t15.%s <> '', t15.%s, t3.img3) img3,
|
IF(t15.%s <> '', t15.%s, t3.img3) img3,
|
||||||
@@ -710,7 +712,7 @@ func GetFullStoreSkus(db *DaoDB, vendorID, storeID int) (skus []*StoreSkuSyncInf
|
|||||||
t1.%s_sync_status sku_sync_status, t1.%s_price vendor_price, t1.%s_lock_time lock_time,
|
t1.%s_sync_status sku_sync_status, t1.%s_price vendor_price, t1.%s_lock_time lock_time,
|
||||||
t1.store_id, t1.deleted_at bind_deleted_at, t1.stock,
|
t1.store_id, t1.deleted_at bind_deleted_at, t1.stock,
|
||||||
t2.*, t2.id sku_id, t2m.vendor_thing_id vendor_sku_id,
|
t2.*, t2.id sku_id, t2m.vendor_thing_id vendor_sku_id,
|
||||||
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc, t3.status name_status, t3.ex_prefix, t3.ex_prefix_begin, t3.ex_prefix_end, t3.category_id name_category_id,t3.tiktok_attribute,t3.mt_attribute,t3.upc_brand_name,t3.upc_tiktok_brand_id,
|
t3.id name_id, t3.prefix, t3.name, t3.unit, t3.upc, t3.status name_status, t3.ex_prefix, t3.ex_prefix_begin, t3.ex_prefix_end, t3.category_id name_category_id,t3.tiktok_attribute,t3.mt_attribute,t3.sell_point,t3.sell_point_times,t3.upc_brand_name,t3.upc_tiktok_brand_id,
|
||||||
IF(t11.%s <> '', t11.%s, t3.img) img,
|
IF(t11.%s <> '', t11.%s, t3.img) img,
|
||||||
IF(t12.%s <> '', t12.%s, t3.img2) img2,
|
IF(t12.%s <> '', t12.%s, t3.img2) img2,
|
||||||
IF(t13.%s <> '', t13.%s, t3.desc_img) desc_img,
|
IF(t13.%s <> '', t13.%s, t3.desc_img) desc_img,
|
||||||
|
|||||||
@@ -191,6 +191,8 @@ type SkuName struct {
|
|||||||
VideoID string `orm:"column(video_id)" json:"videoID"` //商品视频美团ID
|
VideoID string `orm:"column(video_id)" json:"videoID"` //商品视频美团ID
|
||||||
TiktokAttribute string `orm:"column(tiktok_attribute);size(1024)" json:"tiktokAttribute"` //抖音分类属性的存储
|
TiktokAttribute string `orm:"column(tiktok_attribute);size(1024)" json:"tiktokAttribute"` //抖音分类属性的存储
|
||||||
MtAttribute string `orm:"column(mt_attribute);size(1024)" json:"mtAttribute"` //美团分类属性的存储
|
MtAttribute string `orm:"column(mt_attribute);size(1024)" json:"mtAttribute"` //美团分类属性的存储
|
||||||
|
SellPoint string `orm:"column(sell_point);size(128)" json:"sellPoint"` //商品卖点 :(1)限制长度最多不能超过15个字符。 (2)不允许上传emoji等表情符。 (3)更新时传递EMPTY_VALUE支持置空。
|
||||||
|
SellPointTimes string `orm:"column(sell_point_times);size(256)" json:"sellPointTimes"` // 商品卖点展示期,更新时传递EMPTY_VALUE支持置空。{"start_time":1,"end_time":2} 秒级时间戳
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*SkuName) TableUnique() [][]string {
|
func (*SkuName) TableUnique() [][]string {
|
||||||
|
|||||||
@@ -359,6 +359,12 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
if attr != "" {
|
if attr != "" {
|
||||||
foodData["common_attr_value"] = attr
|
foodData["common_attr_value"] = attr
|
||||||
}
|
}
|
||||||
|
if storeSku.SellPoint != "" {
|
||||||
|
foodData["sell_point"] = storeSku.SellPoint
|
||||||
|
}
|
||||||
|
if storeSku.SellPointTimes != "" {
|
||||||
|
foodData["sell_point_times"] = storeSku.SellPointTimes
|
||||||
|
}
|
||||||
catCode := tryCatName2Code(storeSku.VendorCatID)
|
catCode := tryCatName2Code(storeSku.VendorCatID)
|
||||||
if catCode != "" {
|
if catCode != "" {
|
||||||
foodData["category_code"] = catCode
|
foodData["category_code"] = catCode
|
||||||
|
|||||||
Reference in New Issue
Block a user