商品前缀新建表
This commit is contained in:
@@ -75,6 +75,8 @@ type StoreSkuSyncInfo struct {
|
|||||||
ExPrefix string
|
ExPrefix string
|
||||||
ExPrefixBegin *time.Time
|
ExPrefixBegin *time.Time
|
||||||
ExPrefixEnd *time.Time
|
ExPrefixEnd *time.Time
|
||||||
|
ExVendorID int `orm:"column(ex_vendor_id)" json:"exVendorID"`
|
||||||
|
|
||||||
// NameID int `orm:"column(name_id)"`
|
// NameID int `orm:"column(name_id)"`
|
||||||
VendorNameID string `orm:"column(vendor_name_id)"` // 暂时无用
|
VendorNameID string `orm:"column(vendor_name_id)"` // 暂时无用
|
||||||
Name string
|
Name string
|
||||||
@@ -90,10 +92,11 @@ type StoreSkuSyncInfo struct {
|
|||||||
PreparationTime int
|
PreparationTime int
|
||||||
|
|
||||||
// 平台相关的图片信息
|
// 平台相关的图片信息
|
||||||
Img string
|
Img string
|
||||||
Img2 string
|
Img2 string
|
||||||
Img3 string
|
Img3 string
|
||||||
DescImg string
|
DescImg string
|
||||||
|
ImgWatermark string `json:"imgWatermark"` //图片水印
|
||||||
|
|
||||||
VendorVendorCatID int64 `orm:"column(vendor_vendor_cat_id)"` // 平台商品分类(叶子结点)
|
VendorVendorCatID int64 `orm:"column(vendor_vendor_cat_id)"` // 平台商品分类(叶子结点)
|
||||||
CategoryName string `json:"categoryName"` //分类名
|
CategoryName string `json:"categoryName"` //分类名
|
||||||
@@ -407,7 +410,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.store_id, t1.deleted_at bind_deleted_at,t1.status_sale_begin,t1.status_sale_end, t1.jds_ware_id,
|
||||||
t2.*,
|
t2.*,
|
||||||
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.yb_name_suffix,
|
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.yb_name_suffix,
|
||||||
t3.jds_stock_switch, t3.preparation_time,
|
t3.jds_stock_switch, t3.preparation_time, t3.img_watermark, t3.ex_vendor_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,
|
||||||
|
|||||||
@@ -281,3 +281,20 @@ type SkuNameExt struct {
|
|||||||
PlacesStr string `json:"-"`
|
PlacesStr string `json:"-"`
|
||||||
MidUnitPrice int `json:"midUnitPrice"`
|
MidUnitPrice int `json:"midUnitPrice"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SkuExinfoMap struct {
|
||||||
|
ModelIDCULD
|
||||||
|
|
||||||
|
ExPrefix string `orm:"size(255)" json:"exPrefix"`
|
||||||
|
ImgWatermark string `orm:"size(512)" json:"imgWatermark"` //图片水印
|
||||||
|
NameID int `orm:"column(name_id)" json:"nameID"`
|
||||||
|
VendorID int `orm:"column(vendor_id)" json:"vendorID"`
|
||||||
|
BeginAt time.Time `orm:"type(datetime);index" json:"beginAt"`
|
||||||
|
EndAt time.Time `orm:"type(datetime);index" json:"endAt"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*SkuExinfoMap) TableIndex() [][]string {
|
||||||
|
return [][]string{
|
||||||
|
[]string{"NameID", "VendorID", "BeginAt", "EndAt"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
|||||||
for i, storeSku := range storeSkuList {
|
for i, storeSku := range storeSkuList {
|
||||||
isNeedUpdatePrice := isCreate //storeSku.SkuSyncStatus&( model.SyncFlagPriceMask| model.SyncFlagNewMask) != 0
|
isNeedUpdatePrice := isCreate //storeSku.SkuSyncStatus&( model.SyncFlagPriceMask| model.SyncFlagNewMask) != 0
|
||||||
foodData := make(map[string]interface{})
|
foodData := make(map[string]interface{})
|
||||||
foodDataList[i] = foodData
|
foodDataList[i] = foodData
|
||||||
foodData[mtwmapi.KeyAppFoodCode] = utils.Int2Str(storeSku.SkuID)
|
foodData[mtwmapi.KeyAppFoodCode] = utils.Int2Str(storeSku.SkuID)
|
||||||
skus := []map[string]interface{}{
|
skus := []map[string]interface{}{
|
||||||
map[string]interface{}{
|
map[string]interface{}{
|
||||||
|
|||||||
Reference in New Issue
Block a user