update go mod + update send with exception
This commit is contained in:
@ -77,11 +77,11 @@ func SendWithException(ctx *gin.Context, e exception.IException, data interface{
|
||||
if nil == e {
|
||||
e = exception.NewSuccess(data)
|
||||
}
|
||||
if nil != e.GetData() {
|
||||
Send(ctx, e.GetCode(), e.GetHttpCode(), e.GetData())
|
||||
} else {
|
||||
Send(ctx, e.GetCode(), e.GetHttpCode(), data)
|
||||
outputData := map[string]interface{}{
|
||||
"e_data": e.GetData(),
|
||||
"u_e_data": data,
|
||||
}
|
||||
Send(ctx, e.GetCode(), e.GetHttpCode(), outputData)
|
||||
}
|
||||
|
||||
// JSON ctx.JSON 的平替, 增加了数据是否已相应的标识
|
||||
|
Reference in New Issue
Block a user