// Package house_dashboard 定义看房数据看板聚合接口,路由前缀 /house。 package house_dashboard import "github.com/gogf/gf/v2/frame/g" // OverviewRes 看板统计概览。 type OverviewRes struct { CommunityCount int `json:"communityCount"` // 小区数 ListingCount int `json:"listingCount"` // 在售房源数 BargainCount int `json:"bargainCount"` // 笋盘数 LowConfidence int `json:"lowConfidence"` // 低可信房源数 AvgUnitPrice float64 `json:"avgUnitPrice"` // 在售均价(元/平米) AvgTotalPrice float64 `json:"avgTotalPrice"` // 在售平均总价(万元) AvgListDays float64 `json:"avgListDays"` // 平均挂牌天数 } // OverviewReq 看板统计概览请求。 type OverviewReq struct { g.Meta `path:"/house/dashboard/overview" method:"post" tags:"Admin/House/Dashboard" summary:"看板概览"` Region string `json:"region"` } // MapPoint 地图上的一个小区点。 type MapPoint struct { CommunityId uint64 `json:"communityId"` Name string `json:"name"` Region string `json:"region"` Lng float64 `json:"lng"` Lat float64 `json:"lat"` AvgUnitPrice float64 `json:"avgUnitPrice"` ListingCount int `json:"listingCount"` BargainCount int `json:"bargainCount"` } // MapPointsReq 地图点位查询(带筛选)。 type MapPointsReq struct { g.Meta `path:"/house/dashboard/map-points" method:"post" tags:"Admin/House/Dashboard" summary:"地图点位"` Region string `json:"region"` PriceMin float64 `json:"priceMin"` PriceMax float64 `json:"priceMax"` Status int `json:"status"` } // MapPointsRes 是 MapPointsReq 的响应。 type MapPointsRes struct { Points []*MapPoint `json:"points"` } // TrendPoint 一个日期的均价点。 type TrendPoint struct { Date string `json:"date"` AvgListPrice float64 `json:"avgListPrice"` // 挂牌均价(万元) AvgDealPrice float64 `json:"avgDealPrice"` // 成交均价(万元) } // PriceTrendReq 价格趋势查询。 type PriceTrendReq struct { g.Meta `path:"/house/dashboard/price-trend" method:"post" tags:"Admin/House/Dashboard" summary:"价格趋势"` CommunityId uint64 `json:"communityId"` Region string `json:"region"` Limit int `json:"limit" d:"30"` // 最近 N 天 } // PriceTrendRes 是 PriceTrendReq 的响应。 type PriceTrendRes struct { Trend []*TrendPoint `json:"trend"` } // RegionAgg 一个区域的聚合指标。 type RegionAgg struct { Region string `json:"region"` AvgUnitPrice float64 `json:"avgUnitPrice"` ListingCount int `json:"listingCount"` BargainCount int `json:"bargainCount"` } // AggregateRegionReq 区域聚合查询。 type AggregateRegionReq struct { g.Meta `path:"/house/dashboard/aggregate-region" method:"post" tags:"Admin/House/Dashboard" summary:"区域聚合"` } // AggregateRegionRes 是 AggregateRegionReq 的响应。 type AggregateRegionRes struct { List []*RegionAgg `json:"list"` }