- mtps与dada.IsErrShopNotExist
This commit is contained in:
@@ -80,7 +80,8 @@ const (
|
||||
|
||||
// 错误码
|
||||
const (
|
||||
ResponseCodeSuccess = 0
|
||||
ResponseCodeSuccess = 0
|
||||
ResponseCodeShopNotExist = 112 // 门店不存在
|
||||
)
|
||||
|
||||
// 取消原因
|
||||
@@ -376,3 +377,12 @@ func (a *API) SimulateRearrange(deliveryId int64, mtPeiSongId string) (err error
|
||||
func (a *API) SimulateReportException(deliveryId int64, mtPeiSongId string) (err error) {
|
||||
return a.simulateOrderBehavior("reportException", deliveryId, mtPeiSongId)
|
||||
}
|
||||
|
||||
func IsErrShopNotExist(err error) bool {
|
||||
if err != nil {
|
||||
if errExt, ok := err.(*utils.ErrorWithCode); ok && errExt.IntCode() == ResponseCodeShopNotExist {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user