You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1022 B
29 lines
1022 B
package router
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
|
|
v1 "pure-admin/api/admin"
|
|
"pure-admin/middleware"
|
|
)
|
|
|
|
func InitBusinessRouter(Router *gin.RouterGroup) {
|
|
BusinessRouter := Router.Group("business").Use(middleware.OperationRecord())
|
|
{
|
|
BusinessRouter.POST("", v1.CreateBusiness) // 新建Business
|
|
BusinessRouter.DELETE("", v1.DeleteBusiness) // 删除Business
|
|
// BusinessRouter.DELETE("", v1.DeleteBusinessByIds) // 批量删除Business
|
|
BusinessRouter.PUT("", v1.UpdateBusiness) // 更新Business
|
|
BusinessRouter.GET("", v1.GetBusiness) // 根据ID获取Business
|
|
BusinessRouter.GET("list", v1.ListBusiness) // 获取Business列表
|
|
BusinessRouter.GET("search", v1.SearchBusiness) // 获取Business列表
|
|
}
|
|
}
|
|
func InitGoodsRouter(Router *gin.RouterGroup) {
|
|
BusinessRouter := Router.Group("goods").Use(middleware.OperationRecord())
|
|
{
|
|
|
|
BusinessRouter.GET("list", v1.ListGoods) // 获取Business列表
|
|
BusinessRouter.GET("search", v1.SearchGoods) // 获取Business列表
|
|
}
|
|
}
|
|
|