refactor: 归并平台业务逻辑目录

This commit is contained in:
2026-07-26 18:29:36 +08:00
parent 4f2bb7e88b
commit 1ee2a82792
10 changed files with 228 additions and 371 deletions

View File

@@ -5,13 +5,7 @@ import (
"fmt"
"git.apinb.com/bsm-sdk/core/middleware"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/dashboard"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/idn_account"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/org_delivery_point"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/org_gas_station"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/org_service_person"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/ping"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/saf_event"
"git.apinb.com/heqiapp/platforms/backend/api/internal/logic/platform"
"github.com/gin-gonic/gin"
)
@@ -19,18 +13,18 @@ import (
func Register(srvKey string, engine *gin.Engine) {
v1Key := fmt.Sprintf("/%s/%s", srvKey, "v1")
anonymous := engine.Group(v1Key)
anonymous.GET("/ping/hello", ping.Hello)
anonymous.GET("/ping/hello", platform.PingHello)
protected := engine.Group(v1Key)
protected.Use(middleware.JwtAuth(true))
{
protected.GET("/dashboard/overview", dashboard.Overview)
protected.GET("/dashboard/overview", platform.DashboardOverview)
gasStationGroup := protected.Group("/organization/org_gas_station")
gasStationGroup.POST("", org_gas_station.Create)
gasStationGroup.GET("", org_gas_station.List)
protected.GET("/organization/org_delivery_point", org_delivery_point.List)
protected.GET("/organization/org_service_person", org_service_person.List)
protected.GET("/identity/idn_account", idn_account.List)
protected.GET("/safety/saf_event", saf_event.List)
gasStationGroup.POST("", platform.CreateOrgGasStation)
gasStationGroup.GET("", platform.ListOrgGasStation)
protected.GET("/organization/org_delivery_point", platform.ListOrgDeliveryPoint)
protected.GET("/organization/org_service_person", platform.ListOrgServicePerson)
protected.GET("/identity/idn_account", platform.ListIdnAccount)
protected.GET("/safety/saf_event", platform.ListSafEvent)
}
}