23 lines
576 B
Go
23 lines
576 B
Go
package platform
|
|
|
|
import (
|
|
"git.apinb.com/bsm-sdk/core/infra"
|
|
"git.apinb.com/heqiapp/platforms/backend/api/internal/models"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// PingHello 返回匿名健康状态。
|
|
func PingHello(ctx *gin.Context) {
|
|
infra.Response.Success(ctx, gin.H{"service": "platform-api", "status": "ok"})
|
|
}
|
|
|
|
// DashboardOverview 返回平台总后台的运营概览数据。
|
|
func DashboardOverview(ctx *gin.Context) {
|
|
overview, err := models.GetDashboardOverview()
|
|
if err != nil {
|
|
infra.Response.Error(ctx, err)
|
|
return
|
|
}
|
|
infra.Response.Success(ctx, overview)
|
|
}
|