1
This commit is contained in:
@@ -2060,6 +2060,7 @@ func updateStoresSkusWithoutSync(ctx *jxcontext.Context, db *dao.DaoDB, storeIDs
|
||||
skuBind.EbaiID = deletedSku.EbaiID
|
||||
skuBind.JdsID = deletedSku.JdsID
|
||||
skuBind.JdsWareID = deletedSku.JdsWareID
|
||||
skuBind.DdID = deletedSku.DdID
|
||||
if num, err = dao.UpdateEntity(db, skuBind); err != nil {
|
||||
dao.Rollback(db, txDB)
|
||||
return nil, err
|
||||
|
||||
@@ -142,6 +142,7 @@ type DiffData struct {
|
||||
VendorStoreName string `json:"门店名"`
|
||||
SkuID string `json:"SkuID"`
|
||||
MtwmID string `json:"京西美团外卖ID"`
|
||||
DdID string `json:"京西抖店ID"`
|
||||
EbaiID string `json:"京西饿百ID"`
|
||||
SyncStatus string `json:"同步状态"`
|
||||
ToBeCreate string `json:"待创建"`
|
||||
@@ -382,6 +383,8 @@ func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName strin
|
||||
ebaiid := jxSkuInfo.Skus[0].EbaiID
|
||||
/*美团编码*/
|
||||
mtwmid := jxSkuInfo.Skus[0].MtwmID
|
||||
/*抖店编码*/
|
||||
ddid := jxSkuInfo.Skus[0].DdID
|
||||
//jxSkuPrice := strconv.Itoa(jxSkuInfo.Skus[0].JxPrice)
|
||||
/*商品类名*/
|
||||
jxCategoryName := jxSkuInfo.Skus[0].CategoryName
|
||||
@@ -418,7 +421,7 @@ func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName strin
|
||||
vendorPrice := fmt.Sprintf("%.2f", float64(vendorSkuInfo.SkuList[0].StoreSkuInfo.VendorPrice)/float64(100))
|
||||
var IdMark bool
|
||||
if isJd == 0 {
|
||||
IdMark = skuIDStr != ebaiid && skuIDStr != mtwmid
|
||||
IdMark = skuIDStr != ebaiid && skuIDStr != mtwmid && skuIDStr != ddid
|
||||
} else {
|
||||
IdMark = false
|
||||
}
|
||||
@@ -454,12 +457,12 @@ func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName strin
|
||||
if status != model.SkuStatusDontSale {
|
||||
reason += DatAanalyse7
|
||||
}
|
||||
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, vendorSkuDetailName, jxSkuSaleStatusName, vendorSkuSaleStatusName, jxSkuPrice, vendorPrice, jxCategoryName, vendorCategoryName, reason}
|
||||
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, ddid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, vendorSkuDetailName, jxSkuSaleStatusName, vendorSkuSaleStatusName, jxSkuPrice, vendorPrice, jxCategoryName, vendorCategoryName, reason}
|
||||
diffData.AppendData(vendorID, outPutData)
|
||||
}
|
||||
if !isSaleStatusDiff && !isNameDiff {
|
||||
if status != model.SkuStatusDontSale {
|
||||
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, vendorSkuDetailName, jxSkuSaleStatusName, vendorSkuSaleStatusName, jxSkuPrice, vendorPrice, jxCategoryName, vendorCategoryName, DatAanalyse7}
|
||||
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, ddid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, vendorSkuDetailName, jxSkuSaleStatusName, vendorSkuSaleStatusName, jxSkuPrice, vendorPrice, jxCategoryName, vendorCategoryName, DatAanalyse7}
|
||||
diffData.AppendData(vendorID, outPutData)
|
||||
}
|
||||
}
|
||||
@@ -476,7 +479,7 @@ func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName strin
|
||||
if status != model.SkuStatusDontSale {
|
||||
reason += DatAanalyse7
|
||||
}
|
||||
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, "", jxSkuSaleStatusName, "", jxSkuPrice, "", jxCategoryName, "", reason}
|
||||
outPutData := DiffData{storeIDStr, vendorStoreID, storeName, skuIDStr, mtwmid, ddid, ebaiid, syncStatus, toBeCreate, toBeDel, jxSkuDetailName, "", jxSkuSaleStatusName, "", jxSkuPrice, "", jxCategoryName, "", reason}
|
||||
diffData.AppendData(vendorID, outPutData)
|
||||
}
|
||||
}
|
||||
@@ -497,7 +500,7 @@ func CompareJxAndVendor(vendorID int, storeIDStr, vendorStoreID, storeName strin
|
||||
if len(vendorSkuInfo.VendorCatIDList) != 0 {
|
||||
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)
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user