! 饿百API对于门店商品批处理的返回结果发生改变,部分失败时返回错误(之前除了改价,返回的是成功),详情是错误信息中(之前在Data中)

This commit is contained in:
gazebo
2019-07-26 10:24:31 +08:00
parent f2539cf572
commit e34ffd277f
3 changed files with 117 additions and 54 deletions

View File

@@ -79,3 +79,10 @@ func IsErrMatch(err error, strCode string, strList []string) (isMatch bool) {
}
return isMatch
}
func GetErrMsg(err error) (errMsg string) {
if errExt, ok := err.(*ErrorWithCode); ok {
errMsg = errExt.ErrMsg()
}
return errMsg
}