同步错误返回
This commit is contained in:
@@ -256,6 +256,34 @@ func SelectStoreSkuListByFoodList(storeSkuList []*partner.StoreSkuInfo, foodList
|
||||
return selectedStoreSkuList
|
||||
}
|
||||
|
||||
//美团api返回
|
||||
func SelectStoreSynSkuByFoodList(storeSkuList []*dao.StoreSkuSyncInfo, foodList []*mtwmapi.AppFoodResult) (selectedStoreSkuList []*partner.StoreSkuInfoWithErr) {
|
||||
foodMap := make(map[string]string)
|
||||
if len(foodList) > 0 {
|
||||
for _, v := range foodList {
|
||||
foodMap[v.AppFoodCode] = v.ErrorMsg
|
||||
}
|
||||
for _, v := range storeSkuList {
|
||||
if foodMap[v.VendorSkuID] != "" {
|
||||
storeSkuInfo := &partner.StoreSkuInfo{
|
||||
SkuID: v.SkuID,
|
||||
VendorSkuID: v.VendorSkuID,
|
||||
NameID: v.NameID,
|
||||
VendorNameID: v.VendorNameID,
|
||||
VendorPrice: v.VendorPrice,
|
||||
Status: v.Status,
|
||||
}
|
||||
foodFailed := &partner.StoreSkuInfoWithErr{
|
||||
StoreSkuInfo: storeSkuInfo,
|
||||
ErrMsg: foodMap[v.VendorSkuID],
|
||||
}
|
||||
selectedStoreSkuList = append(selectedStoreSkuList, foodFailed)
|
||||
}
|
||||
}
|
||||
}
|
||||
return selectedStoreSkuList
|
||||
}
|
||||
|
||||
//饿百api返回
|
||||
func SelectStoreSkuListByOpResult(storeSkuList []*partner.StoreSkuInfo, opResult *ebaiapi.BatchOpResult) (selectedStoreSkuList []*partner.StoreSkuInfoWithErr) {
|
||||
opResultMap := make(map[int64]string)
|
||||
|
||||
Reference in New Issue
Block a user