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 }