feat: client 增删改查
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type AuthRouter struct {
|
||||
}
|
||||
|
||||
// InitAuthRouter 初始化登录路由
|
||||
func (s *AuthRouter) InitAuthRouter(Router *gin.RouterGroup) {
|
||||
loginRouter := Router.Group("auth")
|
||||
{
|
||||
loginRouter.POST("login", authApi.Login)
|
||||
loginRouter.GET("captcha", authApi.Captcha)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package system
|
||||
|
||||
import "github.com/gin-gonic/gin"
|
||||
|
||||
type ClientRouter struct {
|
||||
}
|
||||
|
||||
func (s *ClientRouter) InitClientRouter(Router *gin.RouterGroup) {
|
||||
clientRouter := Router.Group("client")
|
||||
{
|
||||
clientRouter.POST("save", clientApi.SaveClient)
|
||||
clientRouter.POST("update", clientApi.UpdateClient)
|
||||
clientRouter.POST("getClientList", clientApi.GetClientList)
|
||||
clientRouter.GET("delete", clientApi.Delete)
|
||||
clientRouter.GET("detail", clientApi.Detail)
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,14 @@ package system
|
||||
import v1 "sundynix-go/api/v1"
|
||||
|
||||
type RouterGroup struct {
|
||||
LoginRouter
|
||||
AuthRouter
|
||||
UserRouter
|
||||
ClientRouter
|
||||
}
|
||||
|
||||
// 初始化路由
|
||||
var (
|
||||
loginApi = v1.ApiGroupApp.SystemApiGroup.LoginApi
|
||||
userApi = v1.ApiGroupApp.SystemApiGroup.UserApi
|
||||
authApi = v1.ApiGroupApp.SystemApiGroup.AuthApi
|
||||
userApi = v1.ApiGroupApp.SystemApiGroup.UserApi
|
||||
clientApi = v1.ApiGroupApp.SystemApiGroup.ClientApi
|
||||
)
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type LoginRouter struct {
|
||||
}
|
||||
|
||||
// InitLoginRouter 初始化登录路由
|
||||
func (s *LoginRouter) InitLoginRouter(Router *gin.RouterGroup) {
|
||||
loginRouter := Router.Group("login")
|
||||
{
|
||||
loginRouter.POST("login", loginApi.Login)
|
||||
loginRouter.POST("captcha", loginApi.Captcha)
|
||||
}
|
||||
}
|
||||
@@ -8,4 +8,8 @@ type UserRouter struct {
|
||||
}
|
||||
|
||||
func (s *UserRouter) InitUserRouter(Router *gin.RouterGroup) {
|
||||
userRouter := Router.Group("user")
|
||||
{
|
||||
userRouter.POST("getUserList", userApi.GetUserList)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user