feat(app): update

This commit is contained in:
Yangtao
2025-11-19 14:24:13 +08:00
parent 1eac66d7fd
commit 0c34585649
329 changed files with 10760 additions and 281 deletions

View 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]
}