43 lines
1.2 KiB
Go
43 lines
1.2 KiB
Go
package router
|
|
|
|
import (
|
|
"fonchain-fiee/pkg/middleware"
|
|
"fonchain-fiee/pkg/service"
|
|
"fonchain-fiee/pkg/service/bundle"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func BundleRouter(r *gin.RouterGroup) {
|
|
bundleRoute := r.Group("bundle")
|
|
bundleRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
|
|
bundleAppRoute := r.Group("bundle")
|
|
bundleAppRoute.Use(middleware.CheckLogin(service.AccountFieeProvider))
|
|
// 套餐
|
|
{
|
|
bundleClientRoute := bundleRoute.Group("system")
|
|
{
|
|
bundleClientRoute.POST("create", bundle.CreateBundle)
|
|
bundleClientRoute.POST("update", bundle.UpdateBundle)
|
|
bundleClientRoute.POST("remove", bundle.DeleteBundle)
|
|
bundleClientRoute.POST("bundle-list", bundle.BundleList)
|
|
}
|
|
bundleClientRouteV2 := bundleRoute.Group("system/v2")
|
|
bundleClientRouteV2.POST("save", bundle.SaveBundleV2)
|
|
bundleClientRouteV2.POST("update/shelfStatus", bundle.HandShelf)
|
|
|
|
bundleAppRoute = bundleAppRoute.Group("common")
|
|
{
|
|
bundleAppRoute.POST("bundle-list", bundle.BundleList)
|
|
}
|
|
bundleAppRouteV2 := bundleRoute.Group("common/v2")
|
|
{
|
|
bundleAppRouteV2.POST("bundle-list", bundle.BundleListV2)
|
|
bundleAppRouteV2.POST("bundle-detail", bundle.BundleDetailV2)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|