1
This commit is contained in:
21
common/middleware/dto/response.go
Normal file
21
common/middleware/dto/response.go
Normal file
@ -0,0 +1,21 @@
|
||||
package dto
|
||||
|
||||
/**
|
||||
* TODO 请优先使用 Success 和 Fail 方法响应请求
|
||||
*/
|
||||
|
||||
const (
|
||||
SuccessStatus = 1
|
||||
FailStatus = 0
|
||||
NotLoginStatus = -1 // 未登录
|
||||
ReLoginStatus = -2 // 重新登录
|
||||
)
|
||||
|
||||
// Response 响应结构
|
||||
type Response struct {
|
||||
Status int `json:"status"`
|
||||
Code int `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
Data interface{} `json:"data"`
|
||||
RequestID string `json:"RequestId"`
|
||||
}
|
||||
Reference in New Issue
Block a user