diff --git a/app/hdl/hdl_add_friend.go b/app/hdl/hdl_add_friend.go index e41059b..f5a2024 100644 --- a/app/hdl/hdl_add_friend.go +++ b/app/hdl/hdl_add_friend.go @@ -736,8 +736,8 @@ func NineDimensionalSpace(c *gin.Context) { } list = append(list, md.SpaceListNode{ Name: utils.IntToStr(i) + "维", - MaxCount: utils.Float64ToStr(maxCount), - NowCount: utils.Int64ToStr(nowUserCount), + MaxCount: int(maxCount), + NowCount: int(nowUserCount), }) spaceTotalNums += maxCount } @@ -750,11 +750,11 @@ func NineDimensionalSpace(c *gin.Context) { resp := md.NineDimensionalSpaceResp{ Rows: utils.IntToStr(row), Times: utils.IntToStr(times), - SpaceTotalNums: utils.Float64ToStr(spaceTotalNums), - SpaceNums: utils.Int64ToStr(hasUserCount), + SpaceTotalNums: int(spaceTotalNums), + SpaceNums: int(hasUserCount), SpaceList: list, - ALotOfNums: utils.Float64ToStr(spaceTotalNums), - DayNum: utils.IntToStr(setting.SystemPunishReplaceValue), + ALotOfNums: int(spaceTotalNums), + DayNum: setting.SystemPunishReplaceValue, } e.OutSuc(c, resp, nil) diff --git a/app/hdl/hdl_home_page.go b/app/hdl/hdl_home_page.go index d816787..1a8c00a 100644 --- a/app/hdl/hdl_home_page.go +++ b/app/hdl/hdl_home_page.go @@ -313,7 +313,7 @@ func RealTimePrice(c *gin.Context) { } resp := md.RealTimePriceResp{ - UserCount: utils.AnyToString(userCount), + UserCount: utils.AnyToInt64(userCount), NowPrice: utils.AnyToString(nowPrice), IsRises: isRisesResp, Rises: utils.AnyToString(risesValue), diff --git a/app/hdl/hdl_points_center.go b/app/hdl/hdl_points_center.go index 6253162..82be4f9 100644 --- a/app/hdl/hdl_points_center.go +++ b/app/hdl/hdl_points_center.go @@ -746,7 +746,16 @@ func GetEggPointRecord(c *gin.Context) { list, nowScore, indexNum, err := svc.GetEggPointRecordBase(now, user.Id, page, limit) if err != nil { - e.OutErr(c, e.ERR_DB_ORM, err.Error()) + resp := md.GetEggPointRecordResp{ + NowScore: "0", + List: nil, + Paginate: md.Paginate{ + Limit: limit, + Page: page, + Total: 0, + }, + } + e.OutSuc(c, resp, nil) return } diff --git a/app/md/md_add_friend.go b/app/md/md_add_friend.go index a45c20c..4295f5d 100644 --- a/app/md/md_add_friend.go +++ b/app/md/md_add_friend.go @@ -72,18 +72,18 @@ type MyFansUserListResp struct { type SpaceListNode struct { Name string `json:"name"` // 维度 - MaxCount string `json:"max_count"` // 最大容纳人数 - NowCount string `json:"now_count"` // 当前人数 + MaxCount int `json:"max_count"` // 最大容纳人数 + NowCount int `json:"now_count"` // 当前人数 } type NineDimensionalSpaceResp struct { Rows string `json:"rows"` // 行数 Times string `json:"times"` // 排数 - SpaceTotalNums string `json:"space_total_nums"` // 空间总数 - SpaceNums string `json:"space_nums"` // 空间人数 + SpaceTotalNums int `json:"space_total_nums"` // 空间总数 + SpaceNums int `json:"space_nums"` // 空间人数 SpaceList []SpaceListNode `json:"space_list"` // 数据列表 - ALotOfNums string `json:"a_lot_of_nums"` // 全网至多用户数 - DayNum string `json:"day_num"` // 连续x天不活跃 + ALotOfNums int `json:"a_lot_of_nums"` // 全网至多用户数 + DayNum int `json:"day_num"` // 连续x天不活跃 } type BasalRateResp struct { diff --git a/app/md/md_home_page.go b/app/md/md_home_page.go index 4bf4643..a69eec5 100644 --- a/app/md/md_home_page.go +++ b/app/md/md_home_page.go @@ -19,7 +19,7 @@ type HomePageWatchAdRuleResp struct { } type RealTimePriceResp struct { - UserCount string `json:"user_count"` // 用户数 + UserCount int64 `json:"user_count"` // 用户数 NowPrice string `json:"now_price"` // 当前价格 IsRises bool `json:"is_rises"` // 是否涨/跌价 Rises string `json:"rises"` // 涨价幅度(百分比) diff --git a/docs/docs.go b/docs/docs.go index c3b06f3..ad75896 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -3642,11 +3642,11 @@ const docTemplate = `{ "properties": { "a_lot_of_nums": { "description": "全网至多用户数", - "type": "string" + "type": "integer" }, "day_num": { "description": "连续x天不活跃", - "type": "string" + "type": "integer" }, "rows": { "description": "行数", @@ -3661,11 +3661,11 @@ const docTemplate = `{ }, "space_nums": { "description": "空间人数", - "type": "string" + "type": "integer" }, "space_total_nums": { "description": "空间总数", - "type": "string" + "type": "integer" }, "times": { "description": "排数", @@ -3745,7 +3745,7 @@ const docTemplate = `{ }, "user_count": { "description": "用户数", - "type": "string" + "type": "integer" } } }, @@ -3995,7 +3995,7 @@ const docTemplate = `{ "properties": { "max_count": { "description": "最大容纳人数", - "type": "string" + "type": "integer" }, "name": { "description": "维度", @@ -4003,7 +4003,7 @@ const docTemplate = `{ }, "now_count": { "description": "当前人数", - "type": "string" + "type": "integer" } } }, diff --git a/docs/swagger.json b/docs/swagger.json index 42b5c5c..4091d47 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -3636,11 +3636,11 @@ "properties": { "a_lot_of_nums": { "description": "全网至多用户数", - "type": "string" + "type": "integer" }, "day_num": { "description": "连续x天不活跃", - "type": "string" + "type": "integer" }, "rows": { "description": "行数", @@ -3655,11 +3655,11 @@ }, "space_nums": { "description": "空间人数", - "type": "string" + "type": "integer" }, "space_total_nums": { "description": "空间总数", - "type": "string" + "type": "integer" }, "times": { "description": "排数", @@ -3739,7 +3739,7 @@ }, "user_count": { "description": "用户数", - "type": "string" + "type": "integer" } } }, @@ -3989,7 +3989,7 @@ "properties": { "max_count": { "description": "最大容纳人数", - "type": "string" + "type": "integer" }, "name": { "description": "维度", @@ -3997,7 +3997,7 @@ }, "now_count": { "description": "当前人数", - "type": "string" + "type": "integer" } } }, diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 2ddc578..e0c69a9 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -769,10 +769,10 @@ definitions: properties: a_lot_of_nums: description: 全网至多用户数 - type: string + type: integer day_num: description: 连续x天不活跃 - type: string + type: integer rows: description: 行数 type: string @@ -783,10 +783,10 @@ definitions: type: array space_nums: description: 空间人数 - type: string + type: integer space_total_nums: description: 空间总数 - type: string + type: integer times: description: 排数 type: string @@ -842,7 +842,7 @@ definitions: type: string user_count: description: 用户数 - type: string + type: integer type: object md.RedPackageDetailResp: properties: @@ -1017,13 +1017,13 @@ definitions: properties: max_count: description: 最大容纳人数 - type: string + type: integer name: description: 维度 type: string now_count: description: 当前人数 - type: string + type: integer type: object md.TotalRateResp: properties: