fonchain-fiee/pkg/router/bundle.go

43 lines
1.2 KiB
Go
Raw Normal View History

2025-02-21 13:09:29 +00:00
package router
import (
2025-05-27 01:53:39 +00:00
"fonchain-fiee/pkg/middleware"
"fonchain-fiee/pkg/service"
2025-02-21 13:09:29 +00:00
"fonchain-fiee/pkg/service/bundle"
2025-06-10 06:05:57 +00:00
2025-02-21 13:09:29 +00:00
"github.com/gin-gonic/gin"
)
func BundleRouter(r *gin.RouterGroup) {
bundleRoute := r.Group("bundle")
2025-05-27 01:53:39 +00:00
bundleRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
2025-06-06 08:49:02 +00:00
bundleAppRoute := r.Group("bundle")
bundleAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
2025-02-21 13:09:29 +00:00
// 套餐
{
bundleClientRoute := bundleRoute.Group("system")
{
bundleClientRoute.POST("create", bundle.CreateBundle)
bundleClientRoute.POST("update", bundle.UpdateBundle)
bundleClientRoute.POST("remove", bundle.DeleteBundle)
2025-06-06 08:49:02 +00:00
bundleClientRoute.POST("bundle-list", bundle.BundleList)
2025-02-21 13:09:29 +00:00
}
2025-06-10 06:05:57 +00:00
bundleClientRouteV2 := bundleRoute.Group("system/v2")
bundleClientRouteV2.POST("save", bundle.SaveBundleV2)
bundleClientRouteV2.POST("update/shelfStatus", bundle.HandShelf)
2025-02-21 13:09:29 +00:00
2025-06-06 08:49:02 +00:00
bundleAppRoute = bundleAppRoute.Group("common")
2025-02-21 13:09:29 +00:00
{
bundleAppRoute.POST("bundle-list", bundle.BundleList)
}
2025-06-10 06:05:57 +00:00
bundleAppRouteV2 := bundleRoute.Group("common/v2")
{
bundleAppRouteV2.POST("bundle-list", bundle.BundleListV2)
bundleAppRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
}
2025-02-21 13:09:29 +00:00
}
}