fix(delivery): 增加绑定缓存防频控、发货队列防重试死锁、终止无效回调重试
This commit is contained in:
@@ -2,6 +2,7 @@ package response
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"reflect"
|
||||
@@ -33,6 +34,9 @@ func WithStatus(c *gin.Context, httpStatus int, data interface{}) {
|
||||
}
|
||||
|
||||
func Fail(c *gin.Context, httpStatus int, code int, message string) {
|
||||
if message != "" && c != nil {
|
||||
_ = c.Error(errors.New(message))
|
||||
}
|
||||
c.JSON(httpStatus, Body{Code: code, Message: message})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user