feat(app): update
This commit is contained in:
19
pkg/dto/response/Activity.go
Normal file
19
pkg/dto/response/Activity.go
Normal file
@ -0,0 +1,19 @@
|
||||
package response
|
||||
|
||||
import "gitea.ddegame.cn/open/servicebase/pkg/datasource/fields"
|
||||
|
||||
type ActivityRes struct {
|
||||
ID int32 // 主键
|
||||
ActName string // 活动名称
|
||||
BriefDesc string // 活动介绍
|
||||
BeginTime fields.Time // 活动开始时间
|
||||
EndTime fields.Time // 活动结束时间
|
||||
ViewBeginAt fields.Time // 什么时候开始可见
|
||||
ViewEndAt fields.Time // 什么时候之后不可见
|
||||
ActType string // 活动类型
|
||||
ActPerPrice int32 // 活动单价
|
||||
ActPriceType string // 价格类型 DIAMOND=钻石 POINT=积分
|
||||
ActIcon string // 活动图标
|
||||
ActImg string // 活动图片
|
||||
ActScheme string // 活动链接
|
||||
}
|
||||
9
pkg/dto/response/BasePagingResponse.go
Normal file
9
pkg/dto/response/BasePagingResponse.go
Normal file
@ -0,0 +1,9 @@
|
||||
package response
|
||||
|
||||
// 分页返回的基础对象
|
||||
type BasePagingResponse struct {
|
||||
DataList interface{}
|
||||
HaveMore bool // 是否有更多
|
||||
AnchorId string // 分页锚点
|
||||
Check00 bool `json:"Check00,omitempty"` // 是否苹果审核账号
|
||||
}
|
||||
91
pkg/dto/response/BaseResponse.go
Normal file
91
pkg/dto/response/BaseResponse.go
Normal file
@ -0,0 +1,91 @@
|
||||
package response
|
||||
|
||||
const (
|
||||
SuccessCode = "8000"
|
||||
SystemErrorCode = "8010"
|
||||
ErrorCode = "8020"
|
||||
ErrorUserNotExist = "8030" // 用户不存在
|
||||
ErrorRedEnvelopeOver = "8080" // 红包已抢完
|
||||
ErrorRedEnvelopeOverdue = "8081" // 红包已过期
|
||||
ErrorUserNotActive = "8040" // 未激活
|
||||
DiamondNotEnough = "8050" // 账户余额不足
|
||||
HaveDispatchingOrder = "8031" // 有派单中的订单
|
||||
AccessTokenInvalid = "8100" //ACCESSTOKEN无效
|
||||
ChangedDeviceCode = "8038" // 切换了设备登录
|
||||
NeedUserToAuth = "8037" // 需要身份认证
|
||||
CantKickKing = "8039" // 不能踢国王
|
||||
)
|
||||
|
||||
type BaseResponse struct {
|
||||
Code string
|
||||
Result any
|
||||
Msg string
|
||||
// Ext any `json:"Ext,omitempty"`
|
||||
}
|
||||
|
||||
type EmptyResponse struct {
|
||||
}
|
||||
|
||||
type PageResponse struct {
|
||||
List any
|
||||
Total int64
|
||||
}
|
||||
|
||||
func (r *BaseResponse) Success() bool {
|
||||
return r.Code == SuccessCode
|
||||
}
|
||||
|
||||
// 构造API错误结果
|
||||
func GetErrorResponse(code, errMsg string) BaseResponse {
|
||||
response := BaseResponse{Code: code, Msg: errMsg}
|
||||
return response
|
||||
}
|
||||
|
||||
// 构造API错误结果
|
||||
func GetFailed(errMsg string) BaseResponse {
|
||||
response := BaseResponse{Code: ErrorCode, Msg: errMsg}
|
||||
return response
|
||||
}
|
||||
|
||||
// 构造API错误结果
|
||||
func GetPageResponse(data any, total int64) BaseResponse {
|
||||
return BaseResponse{
|
||||
Code: SuccessCode,
|
||||
Result: PageResponse{
|
||||
List: data,
|
||||
Total: total,
|
||||
},
|
||||
Msg: "",
|
||||
}
|
||||
}
|
||||
|
||||
// 构造API错误结果
|
||||
func Failed(errMsg string) BaseResponse {
|
||||
response := BaseResponse{Code: ErrorCode, Msg: errMsg}
|
||||
return response
|
||||
}
|
||||
|
||||
// 构造API正确结果
|
||||
func GetSuccessResponse(result any) BaseResponse {
|
||||
response := BaseResponse{Code: SuccessCode, Result: result}
|
||||
return response
|
||||
}
|
||||
|
||||
// 构造API正确结果
|
||||
func GetSuccessMsgResponse(msg string, result any) BaseResponse {
|
||||
response := BaseResponse{Code: SuccessCode, Msg: msg, Result: result}
|
||||
return response
|
||||
}
|
||||
|
||||
// 构造API正确结果
|
||||
func GetEmptyResponse() BaseResponse {
|
||||
object := EmptyResponse{}
|
||||
response := BaseResponse{Code: SuccessCode, Result: object}
|
||||
return response
|
||||
}
|
||||
|
||||
// 获取Result=null 对象不存在
|
||||
func GetNullResultResponse() BaseResponse {
|
||||
response := BaseResponse{Code: SuccessCode, Result: nil}
|
||||
return response
|
||||
}
|
||||
15
pkg/dto/response/ChatroomPresentGiftResponse.go
Normal file
15
pkg/dto/response/ChatroomPresentGiftResponse.go
Normal file
@ -0,0 +1,15 @@
|
||||
package response
|
||||
|
||||
// 打赏礼物返回值
|
||||
type ChatroomPresentGiftResponse struct {
|
||||
DiamondBalance string
|
||||
NCoinBalance string
|
||||
DiamondVipLevel string
|
||||
DiamondVipName string
|
||||
IsBatch string
|
||||
AnimationFormat string
|
||||
AnimationApngUrl string
|
||||
FillMode string
|
||||
AnimationGifUrl string
|
||||
//GiftMsg *yunxin.ChatroomPresentGiftMsgBizData `json:"GiftMsg,omitempty"` // 打赏消息体
|
||||
}
|
||||
12
pkg/dto/response/DispatchOrderEmployedResponse.go
Normal file
12
pkg/dto/response/DispatchOrderEmployedResponse.go
Normal file
@ -0,0 +1,12 @@
|
||||
package response
|
||||
|
||||
// 在职陪玩及派单报表 返回实体
|
||||
type DispatchOrderEmployedRes struct {
|
||||
SkillMode string `json:"skillMode"` // 玩法
|
||||
SkillLevel string `json:"skillLevel"`
|
||||
Gender string `json:"gender"`
|
||||
OrderCount int `json:"orderCount"`
|
||||
CompleteOrderCount int `json:"completeOrderCount"`
|
||||
SellerCount int `json:"sellerCount"`
|
||||
CompleteRate float64 `json:"completeRate"`
|
||||
}
|
||||
8
pkg/dto/response/FindTreasureResponse.go
Normal file
8
pkg/dto/response/FindTreasureResponse.go
Normal file
@ -0,0 +1,8 @@
|
||||
package response
|
||||
|
||||
// 寻宝的返回
|
||||
type FindTreasureResponse struct {
|
||||
IsWin string // 是否中奖
|
||||
WinDiamond string // 中的钻石
|
||||
DiamondBalance string // 余额
|
||||
}
|
||||
12
pkg/dto/response/GetAppVersionResponse.go
Normal file
12
pkg/dto/response/GetAppVersionResponse.go
Normal file
@ -0,0 +1,12 @@
|
||||
package response
|
||||
|
||||
// 更新版本的返回
|
||||
type GetAppVersionResponse struct {
|
||||
VersionCode string // 数字版本号
|
||||
VersionName string // 1.0.1
|
||||
MustUpdate string
|
||||
AndroidDownloadUrl string
|
||||
AppstoreScheme string
|
||||
UpdateDesc string
|
||||
FileName string
|
||||
}
|
||||
17
pkg/dto/response/GetChatroomCurrentRoundCharmResponse.go
Normal file
17
pkg/dto/response/GetChatroomCurrentRoundCharmResponse.go
Normal file
@ -0,0 +1,17 @@
|
||||
package response
|
||||
|
||||
// 获取当轮魅力值和座位上的男女top1
|
||||
type GetChatroomCurrentRoundCharmResponse struct {
|
||||
ManTopOneUserId string // 男性top one
|
||||
WomanTopOneUserId string // 女性top one
|
||||
CurrentRoundCharmList []RoundUserCharm
|
||||
}
|
||||
|
||||
// 魅力值用户
|
||||
type RoundUserCharm struct {
|
||||
UserId string
|
||||
Avatar string
|
||||
NickName string
|
||||
CharmValue string
|
||||
Gender string
|
||||
}
|
||||
21
pkg/dto/response/GetChatroomSeatAndQueueInfoResponse.go
Normal file
21
pkg/dto/response/GetChatroomSeatAndQueueInfoResponse.go
Normal file
@ -0,0 +1,21 @@
|
||||
package response
|
||||
|
||||
import "gitea.ddegame.cn/open/servicebase/pkg/dto/yunxin"
|
||||
|
||||
// 聊天室麦序和排队列表对象
|
||||
type GetChatroomSeatAndQueueInfoResponse struct {
|
||||
ChatroomId string // 聊天室ID
|
||||
RoomName string // 房间名称
|
||||
SeatList []yunxin.RoomSeatModel // 嘉宾座位列表
|
||||
AdminSeatList []yunxin.RoomSeatModel // 管理员麦序列表(麦序模式)
|
||||
FreeSeatList []yunxin.RoomSeatModel // 管理员麦序列表(频道模式)
|
||||
Section string // 相亲模板的阶段
|
||||
SurplusTime string `json:"SurplusTime,omitempty"` // 剩余时间
|
||||
Version string // 数据版本
|
||||
TemplateId string // 模板
|
||||
MasterSeat yunxin.RoomSeatModel // 主持位
|
||||
BossSeat *yunxin.RoomSeatModel `json:"BossSeat,omitempty"` // 老板位 频道模式为麦序位
|
||||
WaitingUserQueue []yunxin.ChatroomWaitUpData // 电台排队列表
|
||||
SendMessageTimeGap string // 发言时间 间隔
|
||||
|
||||
}
|
||||
20
pkg/dto/response/GetCreateOrderDataResponse.go
Normal file
20
pkg/dto/response/GetCreateOrderDataResponse.go
Normal file
@ -0,0 +1,20 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"gitea.ddegame.cn/open/servicebase/pkg/dto"
|
||||
)
|
||||
|
||||
// 获取下单页数据返回
|
||||
type GetCreateOrderDataResponse struct {
|
||||
UserId string // 用户Id
|
||||
NickName string // 用户昵称
|
||||
Avatar string // 用户头像
|
||||
Gender string // 性别
|
||||
Birthday string // 生日
|
||||
IsAuth string // 是否身份认证
|
||||
CurrentServerTime string // 当前服务器时间
|
||||
|
||||
// 用户的技能列表
|
||||
UserSkillList []dto.UserSkillDTO // 用户的技能列表
|
||||
|
||||
}
|
||||
12
pkg/dto/response/GetDispatchOrderCenterDataListResponse.go
Normal file
12
pkg/dto/response/GetDispatchOrderCenterDataListResponse.go
Normal file
@ -0,0 +1,12 @@
|
||||
package response
|
||||
|
||||
import "gitea.ddegame.cn/open/servicebase/pkg/dto"
|
||||
|
||||
// 获取派单中心数据列表
|
||||
type GetDispatchOrderCenterDataListResponse struct {
|
||||
LastCreateTime string // 数据截至时间
|
||||
|
||||
// 派单列表
|
||||
DispatchOrderList []dto.DispatchOrderCenterDataDTO
|
||||
HaveMore bool
|
||||
}
|
||||
8
pkg/dto/response/GetHomeTopUsersResponse.go
Normal file
8
pkg/dto/response/GetHomeTopUsersResponse.go
Normal file
@ -0,0 +1,8 @@
|
||||
package response
|
||||
|
||||
import "gitea.ddegame.cn/open/servicebase/pkg/dto"
|
||||
|
||||
type GetHomeTopUsersResponse struct {
|
||||
TopCharmUserList []dto.ListUserDTO
|
||||
TopConsumeUserList []dto.ListUserDTO
|
||||
}
|
||||
29
pkg/dto/response/GetHostGuardListResponse.go
Normal file
29
pkg/dto/response/GetHostGuardListResponse.go
Normal file
@ -0,0 +1,29 @@
|
||||
package response
|
||||
|
||||
type GetHostGuardListResponse struct {
|
||||
UserId string
|
||||
Avatar string
|
||||
NickName string
|
||||
TimeDiff string
|
||||
GoldGuardTime string `json:"GoldGuardTime,omitempty"`
|
||||
SilverGuardTime string `json:"SilverGuardTime,omitempy"`
|
||||
BronzeGuardTime string `json:"BronzeGuardTime,omitempy"`
|
||||
TotalGuardValue int `json:"-"`
|
||||
}
|
||||
|
||||
type HostGuardListResponseList []GetHostGuardListResponse
|
||||
|
||||
// 获取此 slice 的长度
|
||||
func (p HostGuardListResponseList) Len() int {
|
||||
return len(p)
|
||||
}
|
||||
|
||||
// 根据实时分钟流水降序排序 (此处按照自己的业务逻辑写)
|
||||
func (p HostGuardListResponseList) Less(i, j int) bool {
|
||||
return p[i].TotalGuardValue > p[j].TotalGuardValue
|
||||
}
|
||||
|
||||
// 交换数据
|
||||
func (p HostGuardListResponseList) Swap(i, j int) {
|
||||
p[i], p[j] = p[j], p[i]
|
||||
}
|
||||
14
pkg/dto/response/GetMyWithdrawPageResponse.go
Normal file
14
pkg/dto/response/GetMyWithdrawPageResponse.go
Normal file
@ -0,0 +1,14 @@
|
||||
package response
|
||||
|
||||
type GetMyWithdrawPageResponse struct {
|
||||
Id string `json:"id"`
|
||||
UserId string `json:"user_id"`
|
||||
CreateTime string `json:"create_time"`
|
||||
ApplyMoney string `json:"apply_money"`
|
||||
PreTax string `json:"pre_tax"`
|
||||
HandleFee string `json:"handle_fee"`
|
||||
TransferMoney string `json:"transfer_money"`
|
||||
Status string `json:"status"`
|
||||
StatusStr string `json:"status_str"`
|
||||
FeedbackFailReason string `json:"feedback_fail_reason"`
|
||||
}
|
||||
12
pkg/dto/response/GetUserAccountResponse.go
Normal file
12
pkg/dto/response/GetUserAccountResponse.go
Normal file
@ -0,0 +1,12 @@
|
||||
package response
|
||||
|
||||
type GetUserAccountResponse struct {
|
||||
UserId string
|
||||
Status string
|
||||
DiamondBalance int64
|
||||
RevenueBalance int64
|
||||
NCoinBalance int64
|
||||
RevenueCashAmount string // 收益相当于现金
|
||||
NCoinCashAmount string //N币相当于现金
|
||||
ViewNCoin string // 是否显示N币
|
||||
}
|
||||
10
pkg/dto/response/GetUserBankInfoResponse.go
Normal file
10
pkg/dto/response/GetUserBankInfoResponse.go
Normal file
@ -0,0 +1,10 @@
|
||||
package response
|
||||
|
||||
// 获取用户银行信息
|
||||
type GetUserBankInfoResponse struct {
|
||||
BankName string `json:"BankName,omitempty"`
|
||||
BankUserName string `json:"BankUserName,omitempty"`
|
||||
BankBranchName string `json:"BankBranchName,omitempty"`
|
||||
BankCardNo string `json:"BankCardNo,omitempty"`
|
||||
AlipayAccount string `json:"AlipayAccount,omitempty"`
|
||||
}
|
||||
12
pkg/dto/response/GetUserChatroomResponse.go
Normal file
12
pkg/dto/response/GetUserChatroomResponse.go
Normal file
@ -0,0 +1,12 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"gitea.ddegame.cn/open/servicebase/pkg/dto"
|
||||
)
|
||||
|
||||
type GetUserChatroomResponse struct {
|
||||
UserCreatedRoom *dto.ListChatroomDTO `json:"UserCreatedRoom,omitempty"` // 用户创建的
|
||||
|
||||
UserInRoom *dto.ListChatroomDTO `json:"UserInRoom,omitempty"` // 用户所在的聊天室
|
||||
|
||||
}
|
||||
45
pkg/dto/response/GetUserDetailResponse.go
Normal file
45
pkg/dto/response/GetUserDetailResponse.go
Normal file
@ -0,0 +1,45 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"gitea.ddegame.cn/open/servicebase/pkg/dto"
|
||||
)
|
||||
|
||||
type GetUserDetailResponse struct {
|
||||
dto.UserInfoDTO
|
||||
|
||||
IsMySelf string `json:"IsMySelf,omitempty"` // 是否获取的自己 1=自己 0=不是自己
|
||||
MeFollowTa string // 我是否关注他 0=未关注 1=已关注
|
||||
TaFollowMe string `json:"TaFollowMe,omitempty"` // 他是否关注我 0=未关注 1=已关注
|
||||
UserLastActiveTime string `json:"UserLastActiveTime,omitempty"` // 最后登录时间
|
||||
LbsViewString string `json:"LbsViewString,omitempty"` // 当前lbs显示的字符串 同城显示距离 不同城显示城市
|
||||
// PhotoList []model_app_user.UserPhotoModel `json:"PhotoList,omitempty"` // 照片墙
|
||||
MeLaHeiTa string // 是否拉黑了对方
|
||||
GiftWallList []dto.GiftWallDTO `json:"GiftWallList",omitempty` // 礼物墙
|
||||
|
||||
// 用户的动态
|
||||
TimelineList []dto.TimelineDTO
|
||||
TimeLineCount string
|
||||
// 被评论数量
|
||||
SkillRatedCount string
|
||||
|
||||
// 用户卡片技能名称
|
||||
UserCardSkillNames string `json:"UserCardSkillNames",omitempty`
|
||||
|
||||
// 用户公会信息
|
||||
GuildInfo UserGuild
|
||||
}
|
||||
|
||||
// 兼容app端
|
||||
type UserGuild struct {
|
||||
dto.GuildBase
|
||||
GuildLogo string
|
||||
GuildName string
|
||||
GuildScheme string
|
||||
}
|
||||
|
||||
func (d *GetUserDetailResponse) CompleteGuildInfo(guildId string) {
|
||||
// d.GuildInfo.CompleteGuildInfo(guildId)
|
||||
d.GuildInfo.GuildLogo = d.GuildInfo.GuildInfo.Logo
|
||||
d.GuildInfo.GuildName = d.GuildInfo.GuildInfo.Name
|
||||
// d.GuildInfo.GuildScheme = cache_guild.SchemeOrUrl("guild-notice", "enen://webpage?url=https://h5-test-app.ddegame.cn/Normal/ClubManagement/#/?viewNavigation=0")
|
||||
}
|
||||
7
pkg/dto/response/GetUserGuardSeatResponse.go
Normal file
7
pkg/dto/response/GetUserGuardSeatResponse.go
Normal file
@ -0,0 +1,7 @@
|
||||
package response
|
||||
|
||||
// 获取用户守护位返回值
|
||||
type GetUserGuardSeatResponse struct {
|
||||
SeatType string
|
||||
SurplusDays string
|
||||
}
|
||||
8
pkg/dto/response/GetUserRoomBgResponse.go
Normal file
8
pkg/dto/response/GetUserRoomBgResponse.go
Normal file
@ -0,0 +1,8 @@
|
||||
package response
|
||||
|
||||
import "gitea.ddegame.cn/open/servicebase/pkg/dto"
|
||||
|
||||
type UserRoomBgGroup struct {
|
||||
GroupName string
|
||||
BackgroundList []dto.RoomBackgroundImgDTO
|
||||
}
|
||||
42
pkg/dto/response/GetUserSkillDetailResponse.go
Normal file
42
pkg/dto/response/GetUserSkillDetailResponse.go
Normal file
@ -0,0 +1,42 @@
|
||||
package response
|
||||
|
||||
import "gitea.ddegame.cn/open/servicebase/pkg/dto"
|
||||
|
||||
// 获取用户资质页详情的返回对象
|
||||
type GetUserSkillDetailResponse struct {
|
||||
UserId string // 用户Id
|
||||
NickName string // 用户昵称
|
||||
Avatar string // 用户头像
|
||||
Gender string // 性别
|
||||
Birthday string // 生日
|
||||
OnlineTime string // 在线时间
|
||||
IsAuth string // 是否身份认证
|
||||
MeFollowTa string // 是否关注
|
||||
UserSkillId string // 用户技能ID
|
||||
SkillName string // 技能名称
|
||||
SkillMode string // 游戏玩法
|
||||
SkillLevel string // 等级
|
||||
SkillCompanionType string //
|
||||
SkillLevelBgColor string // 等级背景
|
||||
SkillCertImg string // 资质图
|
||||
SkillAudioUrl string // 音频Url
|
||||
AudioTime string // 音频时长
|
||||
GameRole string // 位置
|
||||
Price string // 价格
|
||||
UnitName string // 单位
|
||||
TotalOrderCount string // 总接单数
|
||||
RateCount string // 总评价数
|
||||
AvgRateScore string // 平均分
|
||||
BriefDesc string // 个人说明
|
||||
SkillStatus string // 状态 1=正常 2=待审核 3=冻结 4=拒绝
|
||||
ServiceStatus string // 接单状态 1=接单 0=不接单
|
||||
SkillLevelIcon string // 等级ICON
|
||||
GoodRate string
|
||||
Area string
|
||||
PlayTimeUnit string
|
||||
Playing bool
|
||||
PlayTimeRange []dto.SkillSkuPlayRange
|
||||
|
||||
PropDTO []dto.PropDTO `json:"Props,omitempty"` // 个人属性
|
||||
PriceList []dto.SkuPrice `json:"PriceList,omitempty"` // 价格列表
|
||||
}
|
||||
32
pkg/dto/response/Guild.go
Normal file
32
pkg/dto/response/Guild.go
Normal file
@ -0,0 +1,32 @@
|
||||
package response
|
||||
|
||||
type Guild struct {
|
||||
GuildId string
|
||||
GuildName string
|
||||
GuildBriefDesc string
|
||||
GuildLogo string
|
||||
GuildNo string
|
||||
GuildMemberCnt string
|
||||
ChairmanName string
|
||||
ChairmanAvatar string
|
||||
DefaultRoomId string // 默认房间ID
|
||||
DefaultRoomLock string
|
||||
OrderInstrScheme string // 点单须知地址
|
||||
GuildSkillList []GuildSkill `gorm:"-"`
|
||||
}
|
||||
|
||||
type GuildSkill struct {
|
||||
GuildId string `json:"-"`
|
||||
SkillId string
|
||||
SkillName string
|
||||
SkillIcon string
|
||||
SkillSpecialRequirements string
|
||||
}
|
||||
|
||||
type GuildConfig struct {
|
||||
GuildId string
|
||||
Key string
|
||||
Value string
|
||||
LongValue string
|
||||
Ext string
|
||||
}
|
||||
57
pkg/dto/response/MddResponse.go
Normal file
57
pkg/dto/response/MddResponse.go
Normal file
@ -0,0 +1,57 @@
|
||||
package response
|
||||
|
||||
type MddResponse struct {
|
||||
Code int `json:"code"`
|
||||
Data MddCustomer `json:"data"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
type MddCustomer struct {
|
||||
AccountList []MddAccount `json:"accountList"`
|
||||
Avatar string `json:"avatar"`
|
||||
ConsumeAmount float64 `json:"consumeAmount"`
|
||||
ConsumeTimes int64 `json:"consumeTimes"`
|
||||
CreateTime string `json:"createTime"`
|
||||
DDAppID string `json:"ddAppId"`
|
||||
Gender string `json:"gender"`
|
||||
ID string `json:"id"`
|
||||
IDCard string `json:"idCard"`
|
||||
IsAuth string `json:"isAuth"`
|
||||
Memo string `json:"memo"`
|
||||
Mobile string `json:"mobile"`
|
||||
RechargeAmount float64 `json:"rechargeAmount"`
|
||||
RechargeTimes int64 `json:"rechargeTimes"`
|
||||
Status string `json:"status"`
|
||||
TrueName string `json:"trueName"`
|
||||
UserName string `json:"userName"`
|
||||
UserNo string `json:"userNo"`
|
||||
YyNo string `json:"yyNo"`
|
||||
}
|
||||
|
||||
type MddAccount struct {
|
||||
Balance float64 `json:"balance"`
|
||||
CardID float64 `json:"cardId"`
|
||||
CardName string `json:"cardName"`
|
||||
CardType string `json:"cardType"`
|
||||
CreateAt string `json:"createAt"`
|
||||
CustomerID int64 `json:"customerId"`
|
||||
CustomerName string `json:"customerName"`
|
||||
CustomerNo string `json:"customerNo"`
|
||||
DiscountRate float64 `json:"discountRate"`
|
||||
FrozenBalance float64 `json:"frozenBalance"`
|
||||
GiveBalance float64 `json:"giveBalance"`
|
||||
ID string `json:"id,omitempty"`
|
||||
SellerNickName string `json:"sellerNickName"`
|
||||
}
|
||||
|
||||
// 同步返回的数据
|
||||
type SyncData struct {
|
||||
TotalDiamond int
|
||||
TotalConsumeAmount int
|
||||
}
|
||||
|
||||
type MddSyncResponse struct {
|
||||
Code int `json:"code"`
|
||||
Data SyncData `json:"data"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
23
pkg/dto/response/NoticeResponse.go
Normal file
23
pkg/dto/response/NoticeResponse.go
Normal file
@ -0,0 +1,23 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type NoticeListResponse struct {
|
||||
ID string // ID
|
||||
Title string // 标题
|
||||
Description string // 描述
|
||||
HeadImg string // 头图
|
||||
JumpContent int32 // 状态1=跳转 2=不跳转
|
||||
CreateTime time.Time //创建时间
|
||||
}
|
||||
|
||||
type NoticeDetailResponse struct {
|
||||
Title string // 标题
|
||||
Description string // 描述
|
||||
HeadImg string // 头图
|
||||
JumpContent int32 // 状态1=跳转 2=不跳转
|
||||
Content string //富文本内容
|
||||
CreateTime time.Time //创建时间
|
||||
}
|
||||
5
pkg/dto/response/OpenRoomResponse.go
Normal file
5
pkg/dto/response/OpenRoomResponse.go
Normal file
@ -0,0 +1,5 @@
|
||||
package response
|
||||
|
||||
type OpenRoomResponse struct {
|
||||
ActionResult string
|
||||
}
|
||||
6
pkg/dto/response/PresentGiftFromChatRoomResponse.go
Normal file
6
pkg/dto/response/PresentGiftFromChatRoomResponse.go
Normal file
@ -0,0 +1,6 @@
|
||||
package response
|
||||
|
||||
type PresentGiftFromChatRoomResponse struct {
|
||||
ChatroomRoomId string
|
||||
ChatroomTotalRevenue string
|
||||
}
|
||||
6
pkg/dto/response/QiNiuTokenResponse.go
Normal file
6
pkg/dto/response/QiNiuTokenResponse.go
Normal file
@ -0,0 +1,6 @@
|
||||
package response
|
||||
|
||||
type QiNiuTokenResponse struct {
|
||||
UploadToken string
|
||||
ExpiresTime string
|
||||
}
|
||||
7
pkg/dto/response/RefreshAccessTokenResponse.go
Normal file
7
pkg/dto/response/RefreshAccessTokenResponse.go
Normal file
@ -0,0 +1,7 @@
|
||||
package response
|
||||
|
||||
import "gitea.ddegame.cn/open/servicebase/pkg/dto"
|
||||
|
||||
type RefreshAccessTokenResponse struct {
|
||||
dto.AccessTokenDTO
|
||||
}
|
||||
32
pkg/dto/response/Response.go
Normal file
32
pkg/dto/response/Response.go
Normal file
@ -0,0 +1,32 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
const (
|
||||
NeedLogin = "6018" // 登陆过期
|
||||
|
||||
)
|
||||
|
||||
type Response struct {
|
||||
Code string
|
||||
Result interface{}
|
||||
Msg string
|
||||
}
|
||||
|
||||
func Fail(msg string) BaseResponse {
|
||||
response := BaseResponse{Code: ErrorCode, Msg: msg}
|
||||
return response
|
||||
}
|
||||
|
||||
func Invalid() string {
|
||||
response := BaseResponse{Code: NeedLogin, Msg: "用户身份已过期,请重新登录!"}
|
||||
str, _ := json.Marshal(response)
|
||||
return string(str)
|
||||
}
|
||||
|
||||
func Success(Result interface{}) BaseResponse {
|
||||
response := BaseResponse{Code: SuccessCode, Result: Result}
|
||||
return response
|
||||
}
|
||||
14
pkg/dto/response/SearchResponse.go
Normal file
14
pkg/dto/response/SearchResponse.go
Normal file
@ -0,0 +1,14 @@
|
||||
package response
|
||||
|
||||
import "gitea.ddegame.cn/open/servicebase/pkg/dto"
|
||||
|
||||
type SearchResponse struct {
|
||||
UserInfo dto.UserInfoDTO
|
||||
ChatroomInfo dto.ListChatroomDTO
|
||||
}
|
||||
|
||||
type SearchV2Response struct {
|
||||
UserList []dto.UserInfoDTO
|
||||
ChatroomList []dto.ListChatroomDTO
|
||||
GuildList []dto.GuildDTO
|
||||
}
|
||||
6
pkg/dto/response/SendVericodeResponse.go
Normal file
6
pkg/dto/response/SendVericodeResponse.go
Normal file
@ -0,0 +1,6 @@
|
||||
package response
|
||||
|
||||
type SendVericodeResponse struct {
|
||||
SendSuccess string
|
||||
ErrorMsg string
|
||||
}
|
||||
11
pkg/dto/response/SubmailResponse.go
Normal file
11
pkg/dto/response/SubmailResponse.go
Normal file
@ -0,0 +1,11 @@
|
||||
package response
|
||||
|
||||
type SubmailResponse struct {
|
||||
Status string `json:"status"`
|
||||
SendId string `json:"send_id"`
|
||||
Fee float64 `json:"fee"`
|
||||
AccountBalance float64 `json:"account_balance"`
|
||||
SmsCredits string `json:"sms_credits"`
|
||||
Code string `json:"code"`
|
||||
Msg string `json:"msg"`
|
||||
}
|
||||
21
pkg/dto/response/UserGoodsDTO.go
Normal file
21
pkg/dto/response/UserGoodsDTO.go
Normal file
@ -0,0 +1,21 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"gitea.ddegame.cn/open/servicebase/pkg/dto"
|
||||
)
|
||||
|
||||
type UserMarketDTO struct {
|
||||
Info UserInfo
|
||||
StoreList []dto.UserStoreGoodsDTO
|
||||
Basic map[string]interface{}
|
||||
}
|
||||
|
||||
type UserInfo struct {
|
||||
Avatar string
|
||||
UserNo string
|
||||
Nickname string
|
||||
DiamondBalance int64
|
||||
RevenueBalance int64
|
||||
PointsBalance int64
|
||||
// ...
|
||||
}
|
||||
7
pkg/dto/response/UserSignInResponse.go
Normal file
7
pkg/dto/response/UserSignInResponse.go
Normal file
@ -0,0 +1,7 @@
|
||||
package response
|
||||
|
||||
import "gitea.ddegame.cn/open/servicebase/pkg/dto"
|
||||
|
||||
type UserSignInResponse struct {
|
||||
dto.AccessTokenDTO
|
||||
}
|
||||
Reference in New Issue
Block a user