同步错误返回

This commit is contained in:
苏尹岚
2019-11-26 11:27:52 +08:00
parent 483d3c8dbc
commit d69ad7a9e4
4 changed files with 10 additions and 8 deletions

View File

@@ -144,7 +144,7 @@ type ISingleStoreStoreSkuHandler interface {
GetStoreSkusFullInfo(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, storeSkuList []*StoreSkuInfo) (outSkuNameList []*SkuNameInfo, err error)
CreateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (successList []*dao.StoreSkuSyncInfo, err error)
UpdateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*dao.StoreSkuSyncInfo, err error)
UpdateStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*dao.StoreSkuSyncInfo) (failedList []*dao.StoreSkuInfoWithErr, err error)
DeleteStoreSkus(ctx *jxcontext.Context, storeID int, vendorStoreID string, storeSkuList []*StoreSkuInfo) (successList []*StoreSkuInfo, err error)
DeleteStoreAllSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, storeID int, vendorStoreID string, isContinueWhenError bool) (err error)
IsErrSkuExist(err error) (isExist bool)

View File

@@ -297,16 +297,16 @@ func SelectStoreSkuListByResponseList(storeSkuList []*partner.StoreSkuInfo, resp
}
func GetErrMsg2FailedSingleList(storeSkuList []*partner.StoreSkuInfo, err error) (failedList []*partner.StoreSkuInfoWithErr) {
failedList2 := make([]*partner.StoreSkuInfoWithErr, 1)
if err != nil {
if errExt, ok := err.(*utils.ErrorWithCode); ok {
failedList2[0] = &partner.StoreSkuInfoWithErr{
storeSkuInfoWithErr := &partner.StoreSkuInfoWithErr{
StoreSkuInfo: storeSkuList[0],
ErrMsg: errExt.ErrMsg(),
}
failedList = append(failedList, storeSkuInfoWithErr)
}
}
return failedList2
return failedList
}
func UnselectStoreSkuSyncListByVendorSkuIDs(storeSkuList []*dao.StoreSkuSyncInfo, vendorSkuIDs []string) (selectedStoreSkuList []*dao.StoreSkuSyncInfo) {