- delivery.IsErrShopExist

This commit is contained in:
gazebo
2019-07-24 18:18:21 +08:00
parent 32b53c9c9e
commit 3af1d77500
3 changed files with 19 additions and 0 deletions

View File

@@ -186,3 +186,12 @@ func IsErrShopNotExist(err error) bool {
}
return false
}
func IsErrShopExist(err error) bool {
if err != nil {
if errExt, ok := err.(*utils.ErrorWithCode); ok && errExt.IntCode() == ResponseCodeShopAlreadyExist {
return true
}
}
return false
}