Merge branch 'jdshop' of https://e.coding.net/rosydev/jx-callback into jdshop
This commit is contained in:
@@ -3597,18 +3597,20 @@ func jxStatusTransForm(categoryName string) []string {
|
|||||||
// 根据不同平台判断返回不同的价格类型
|
// 根据不同平台判断返回不同的价格类型
|
||||||
func vendorPriceTransForm(storeSkuExt *dao.StoreSkuExt, vendorID int) int64 {
|
func vendorPriceTransForm(storeSkuExt *dao.StoreSkuExt, vendorID int) int64 {
|
||||||
switch vendorID {
|
switch vendorID {
|
||||||
case 1:
|
case model.VendorIDMTWM:
|
||||||
return int64(storeSkuExt.MtwmPrice)
|
return int64(storeSkuExt.MtwmPrice)
|
||||||
case 0:
|
case model.VendorIDJD:
|
||||||
return int64(storeSkuExt.JdPrice)
|
return int64(storeSkuExt.JdPrice)
|
||||||
case 3:
|
case model.VendorIDEBAI:
|
||||||
return int64(storeSkuExt.EbaiPrice)
|
return int64(storeSkuExt.EbaiPrice)
|
||||||
case 4:
|
case model.VendorIDYB:
|
||||||
return int64(storeSkuExt.YbPrice)
|
return int64(storeSkuExt.YbPrice)
|
||||||
case 5:
|
case model.VendorIDJDShop:
|
||||||
return int64(storeSkuExt.JdsPrice)
|
return int64(storeSkuExt.JdsPrice)
|
||||||
case 14:
|
case model.VendorIDDD:
|
||||||
return int64(storeSkuExt.DdPrice)
|
return int64(storeSkuExt.DdPrice)
|
||||||
|
case model.VendorIDTaoVegetable:
|
||||||
|
return int64(storeSkuExt.TaoPrice)
|
||||||
default:
|
default:
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ type DiffData struct {
|
|||||||
VendorStoreName string `json:"门店名"`
|
VendorStoreName string `json:"门店名"`
|
||||||
SkuID string `json:"SkuID"`
|
SkuID string `json:"SkuID"`
|
||||||
MtwmID string `json:"京西美团外卖ID"`
|
MtwmID string `json:"京西美团外卖ID"`
|
||||||
|
TaoID string `json:"淘鲜达ID"`
|
||||||
DdID string `json:"京西抖店ID"`
|
DdID string `json:"京西抖店ID"`
|
||||||
EbaiID string `json:"京西饿百ID"`
|
EbaiID string `json:"京西饿百ID"`
|
||||||
SyncStatus string `json:"同步状态"`
|
SyncStatus string `json:"同步状态"`
|
||||||
@@ -385,6 +386,8 @@ func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName strin
|
|||||||
mtwmid := jxSkuInfo.Skus[0].MtwmID
|
mtwmid := jxSkuInfo.Skus[0].MtwmID
|
||||||
/*抖店编码*/
|
/*抖店编码*/
|
||||||
ddid := jxSkuInfo.Skus[0].DdID
|
ddid := jxSkuInfo.Skus[0].DdID
|
||||||
|
/*淘先达编码*/
|
||||||
|
taoid := jxSkuInfo.Skus[0].TaoID
|
||||||
//jxSkuPrice := strconv.Itoa(jxSkuInfo.Skus[0].JxPrice)
|
//jxSkuPrice := strconv.Itoa(jxSkuInfo.Skus[0].JxPrice)
|
||||||
/*商品类名*/
|
/*商品类名*/
|
||||||
jxCategoryName := jxSkuInfo.Skus[0].CategoryName
|
jxCategoryName := jxSkuInfo.Skus[0].CategoryName
|
||||||
@@ -423,7 +426,7 @@ func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName strin
|
|||||||
vendorPrice := fmt.Sprintf("%.2f", float64(vendorSkuInfo.SkuList[0].StoreSkuInfo.VendorPrice)/float64(100))
|
vendorPrice := fmt.Sprintf("%.2f", float64(vendorSkuInfo.SkuList[0].StoreSkuInfo.VendorPrice)/float64(100))
|
||||||
var IdMark bool
|
var IdMark bool
|
||||||
if isJd == 0 {
|
if isJd == 0 {
|
||||||
IdMark = skuIDStr != ebaiid && skuIDStr != mtwmid && skuIDStr != ddid
|
IdMark = skuIDStr != ebaiid && skuIDStr != mtwmid && skuIDStr != ddid && skuIDStr != taoid
|
||||||
} else {
|
} else {
|
||||||
IdMark = false
|
IdMark = false
|
||||||
}
|
}
|
||||||
@@ -459,12 +462,12 @@ func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName strin
|
|||||||
if status != model.SkuStatusDontSale {
|
if status != model.SkuStatusDontSale {
|
||||||
reason += DatAanalyse7
|
reason += DatAanalyse7
|
||||||
}
|
}
|
||||||
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, ddid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, vendorSkuDetailName, jxSkuSaleStatusName, vendorSkuSaleStatusName, jxSkuPrice, vendorPrice, jxCategoryName, vendorCategoryName, reason}
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, taoid, ddid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, vendorSkuDetailName, jxSkuSaleStatusName, vendorSkuSaleStatusName, jxSkuPrice, vendorPrice, jxCategoryName, vendorCategoryName, reason}
|
||||||
diffData.AppendData(vendorID, outPutData)
|
diffData.AppendData(vendorID, outPutData)
|
||||||
}
|
}
|
||||||
if !isSaleStatusDiff && !isNameDiff {
|
if !isSaleStatusDiff && !isNameDiff {
|
||||||
if status != model.SkuStatusDontSale {
|
if status != model.SkuStatusDontSale {
|
||||||
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, ddid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, vendorSkuDetailName, jxSkuSaleStatusName, vendorSkuSaleStatusName, jxSkuPrice, vendorPrice, jxCategoryName, vendorCategoryName, DatAanalyse7}
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, taoid, ddid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, vendorSkuDetailName, jxSkuSaleStatusName, vendorSkuSaleStatusName, jxSkuPrice, vendorPrice, jxCategoryName, vendorCategoryName, DatAanalyse7}
|
||||||
diffData.AppendData(vendorID, outPutData)
|
diffData.AppendData(vendorID, outPutData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -481,7 +484,7 @@ func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName strin
|
|||||||
if status != model.SkuStatusDontSale {
|
if status != model.SkuStatusDontSale {
|
||||||
reason += DatAanalyse7
|
reason += DatAanalyse7
|
||||||
}
|
}
|
||||||
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, ddid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, "", jxSkuSaleStatusName, "", jxSkuPrice, "", jxCategoryName, "", reason}
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, taoid, ddid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, "", jxSkuSaleStatusName, "", jxSkuPrice, "", jxCategoryName, "", reason}
|
||||||
diffData.AppendData(vendorID, outPutData)
|
diffData.AppendData(vendorID, outPutData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -502,7 +505,7 @@ func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName strin
|
|||||||
if len(vendorSkuInfo.VendorCatIDList) != 0 {
|
if len(vendorSkuInfo.VendorCatIDList) != 0 {
|
||||||
vendorCategoryName = vendorSkuInfo.VendorCatIDList[len(vendorSkuInfo.VendorCatIDList)-1]
|
vendorCategoryName = vendorSkuInfo.VendorCatIDList[len(vendorSkuInfo.VendorCatIDList)-1]
|
||||||
}
|
}
|
||||||
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, "", "", "", "", "", "", vendorSkuDetailName, "", vendorSkuSaleStatusName, "", vendorPrice, "", vendorCategoryName, DatAanalyse1, ""}
|
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, "", "", "", "", "", "", "", vendorSkuDetailName, "", vendorSkuSaleStatusName, "", vendorPrice, "", vendorCategoryName, DatAanalyse1, ""}
|
||||||
diffData.AppendData(vendorID, outPutData)
|
diffData.AppendData(vendorID, outPutData)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -294,6 +294,7 @@ type StoreSkuExt struct {
|
|||||||
YbID string `orm:"column(yb_id);index" json:"ybID"`
|
YbID string `orm:"column(yb_id);index" json:"ybID"`
|
||||||
DdID string `orm:"column(dd_id);index" json:"ddID"`
|
DdID string `orm:"column(dd_id);index" json:"ddID"`
|
||||||
JdsID string `orm:"column(jds_id);index" json:"jdsID"`
|
JdsID string `orm:"column(jds_id);index" json:"jdsID"`
|
||||||
|
TaoID string `orm:"column(tao_id)" json:"taoID"` // 这个也不是必须的,只是为了DAO取数据语句一致
|
||||||
|
|
||||||
JdSyncStatus int8 `orm:"default(2)" json:"jdSyncStatus"`
|
JdSyncStatus int8 `orm:"default(2)" json:"jdSyncStatus"`
|
||||||
EbaiSyncStatus int8 `orm:"default(2)" json:"ebaiSyncStatus"`
|
EbaiSyncStatus int8 `orm:"default(2)" json:"ebaiSyncStatus"`
|
||||||
@@ -306,6 +307,7 @@ type StoreSkuExt struct {
|
|||||||
JdPrice int `json:"jdPrice"`
|
JdPrice int `json:"jdPrice"`
|
||||||
EbaiPrice int `json:"ebaiPrice"`
|
EbaiPrice int `json:"ebaiPrice"`
|
||||||
MtwmPrice int `json:"mtwmPrice"`
|
MtwmPrice int `json:"mtwmPrice"`
|
||||||
|
TaoPrice int `json:"taoPrice"`
|
||||||
JxPrice int `json:"jxPrice"`
|
JxPrice int `json:"jxPrice"`
|
||||||
YbPrice int `json:"ybPrice"`
|
YbPrice int `json:"ybPrice"`
|
||||||
JdsPrice int `json:"jdsPrice"`
|
JdsPrice int `json:"jdsPrice"`
|
||||||
@@ -315,6 +317,7 @@ type StoreSkuExt struct {
|
|||||||
JdsLockTime *time.Time `orm:"null" json:"jdsLockTime,omitempty"`
|
JdsLockTime *time.Time `orm:"null" json:"jdsLockTime,omitempty"`
|
||||||
EbaiLockTime *time.Time `orm:"null" json:"ebaiLockTime,omitempty"`
|
EbaiLockTime *time.Time `orm:"null" json:"ebaiLockTime,omitempty"`
|
||||||
MtwmLockTime *time.Time `orm:"null" json:"mtwmLockTime,omitempty"`
|
MtwmLockTime *time.Time `orm:"null" json:"mtwmLockTime,omitempty"`
|
||||||
|
TaoLockTime *time.Time `orm:"null" json:"taoLockTime,omitempty"`
|
||||||
DdLockTime *time.Time `orm:"null" json:"ddLockTime,omitempty"`
|
DdLockTime *time.Time `orm:"null" json:"ddLockTime,omitempty"`
|
||||||
JxLockTime *time.Time `orm:"null" json:"jxLockTime,omitempty"`
|
JxLockTime *time.Time `orm:"null" json:"jxLockTime,omitempty"`
|
||||||
YbLockTime *time.Time `orm:"null" json:"ybLockTime,omitempty"`
|
YbLockTime *time.Time `orm:"null" json:"ybLockTime,omitempty"`
|
||||||
|
|||||||
Reference in New Issue
Block a user