同步错误返回
This commit is contained in:
@@ -337,6 +337,27 @@ func GetErrMsg2FailedSingleList(storeSkuList []*partner.StoreSkuInfo, err error)
|
||||
return failedList
|
||||
}
|
||||
|
||||
func GetErrMsg2FailedSyncSingleList(storeSkuList []*dao.StoreSkuSyncInfo, err error) (failedList []*partner.StoreSkuInfoWithErr) {
|
||||
if err != nil {
|
||||
if errExt, ok := err.(*utils.ErrorWithCode); ok {
|
||||
storeSkuInfo := &partner.StoreSkuInfo{
|
||||
SkuID: storeSkuList[0].SkuID,
|
||||
VendorSkuID: storeSkuList[0].VendorSkuID,
|
||||
NameID: storeSkuList[0].NameID,
|
||||
VendorNameID: storeSkuList[0].VendorNameID,
|
||||
VendorPrice: storeSkuList[0].VendorPrice,
|
||||
Status: storeSkuList[0].Status,
|
||||
}
|
||||
storeSkuInfoWithErr := &partner.StoreSkuInfoWithErr{
|
||||
StoreSkuInfo: storeSkuInfo,
|
||||
ErrMsg: errExt.ErrMsg(),
|
||||
}
|
||||
failedList = append(failedList, storeSkuInfoWithErr)
|
||||
}
|
||||
}
|
||||
return failedList
|
||||
}
|
||||
|
||||
func UnselectStoreSkuSyncListByVendorSkuIDs(storeSkuList []*dao.StoreSkuSyncInfo, vendorSkuIDs []string) (selectedStoreSkuList []*dao.StoreSkuSyncInfo) {
|
||||
if len(vendorSkuIDs) > 0 {
|
||||
vendorSkuIDMap := jxutils.StringList2Map(vendorSkuIDs)
|
||||
|
||||
Reference in New Issue
Block a user