feat(app): update
This commit is contained in:
@ -4,7 +4,7 @@ import "gitea.ddegame.cn/open/servicebase/pkg/common/http/dto"
|
||||
|
||||
type CommonResponse struct {
|
||||
Code string
|
||||
Result interface{}
|
||||
Result any
|
||||
Msg string
|
||||
}
|
||||
|
||||
@ -22,15 +22,15 @@ type UserInviteSummaryResponse struct {
|
||||
Msg string
|
||||
}
|
||||
|
||||
func Success(data interface{}) (res CommonResponse) {
|
||||
func Success(data any) (res CommonResponse) {
|
||||
res.Code = "6000"
|
||||
res.Result = data
|
||||
return
|
||||
}
|
||||
|
||||
func Page(data interface{}, count int64) (res CommonResponse) {
|
||||
func Page(data any, count int64) (res CommonResponse) {
|
||||
res.Code = "6000"
|
||||
res.Result = map[string]interface{}{
|
||||
res.Result = map[string]any{
|
||||
"list": data,
|
||||
"count": count,
|
||||
}
|
||||
@ -43,7 +43,7 @@ func Failed(msg string) (res CommonResponse) {
|
||||
return
|
||||
}
|
||||
|
||||
func Gen(code, msg string, result interface{}) (res CommonResponse) {
|
||||
func Gen(code, msg string, result any) (res CommonResponse) {
|
||||
res.Code = code
|
||||
res.Msg = msg
|
||||
res.Result = result
|
||||
|
||||
Reference in New Issue
Block a user