zhangqian
2024-04-07 bd33bea0f3b44e608fcb4d9aa9d1f51a2f5bcf17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package router
 
import (
    v1 "aps_crm/api/v1"
    "github.com/gin-gonic/gin"
)
 
type ClientRouter struct{}
 
func (c *ClientRouter) InitClientRouter(router *gin.RouterGroup) {
    clientRouter := router.Group("client")
    clientApi := v1.ApiGroup.ClientApi
    {
        clientRouter.POST("add", clientApi.Add)             // 添加客户
        clientRouter.DELETE("delete", clientApi.Delete)     // 删除客户
        clientRouter.PUT("update", clientApi.Update)        // 更新客户
        clientRouter.POST("list", clientApi.List)           // 获取客户列表
        clientRouter.POST("checkName", clientApi.CheckName) // 检查客户名称是否重复
    }
}