first commit

This commit is contained in:
Yangtao
2025-11-18 17:48:20 +08:00
commit 6e56cab848
196 changed files with 65809 additions and 0 deletions

View File

@ -0,0 +1,51 @@
package response
import "servicebase/pkg/common/http/dto"
type CommonResponse struct {
Code string
Result interface{}
Msg string
}
// 用户信息
type UserInfoResponse struct {
Code string
Result dto.UserDTO
Msg string
}
//获取用户邀请汇总数据返回
type UserInviteSummaryResponse struct {
Code string
Result dto.UserInviteSummaryDTO
Msg string
}
func Success(data interface{}) (res CommonResponse) {
res.Code = "6000"
res.Result = data
return
}
func Page(data interface{}, count int64) (res CommonResponse) {
res.Code = "6000"
res.Result = map[string]interface{}{
"list": data,
"count": count,
}
return
}
func Failed(msg string) (res CommonResponse) {
res.Code = "8020"
res.Msg = msg
return
}
func Gen(code, msg string, result interface{}) (res CommonResponse) {
res.Code = code
res.Msg = msg
res.Result = result
return
}