add newapilist

This commit is contained in:
Mrx
2026-03-23 15:34:27 +08:00
parent e03e6b983c
commit 5e658f2527
2 changed files with 6 additions and 6 deletions

View File

@@ -1232,7 +1232,7 @@ func (h *StatisticsHandler) GetRechargeStatistics(c *gin.Context) {
// GetLatestProducts 获取最新产品推荐
// @Summary 获取最新产品推荐
// @Description 获取近一月内新增的产品如果近一月内没有新增则返回最新的前10个产品
// @Tags 统计
// @Tags 统计公开接口
// @Accept json
// @Produce json
// @Param limit query int false "返回数量限制" default(10)

View File

@@ -48,6 +48,9 @@ func (r *StatisticsRoutes) Register(router *sharedhttp.GinRouter) {
// 获取API受欢迎榜单公开接口
statistics.GET("/api-popularity-ranking", r.statisticsHandler.GetPublicApiPopularityRanking)
// 获取最新产品推荐(公开接口)
statistics.GET("/latest-products", r.statisticsHandler.GetLatestProducts)
}
// 用户统计接口 - 需要认证
@@ -61,9 +64,6 @@ func (r *StatisticsRoutes) Register(router *sharedhttp.GinRouter) {
userStats.GET("/consumption", r.statisticsHandler.GetConsumptionStatistics)
userStats.GET("/recharge", r.statisticsHandler.GetRechargeStatistics)
// 获取最新产品推荐
userStats.GET("/latest-products", r.statisticsHandler.GetLatestProducts)
// 获取指标列表
userStats.GET("/metrics", r.statisticsHandler.GetMetrics)