background.go
3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package routers
import (
"github.com/beego/beego/v2/server/web"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers/backgroud_client"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers/web_client"
)
func init() {
// dictionary
web.Router("/v1/background/dictionary/", &backgroud_client.DictionaryController{}, "Post:CreateDictionary")
web.Router("/v1/background/dictionary/:dictionaryId", &backgroud_client.DictionaryController{}, "Put:UpdateDictionary")
web.Router("/v1/background/dictionary/:dictionaryId", &backgroud_client.DictionaryController{}, "Get:GetDictionary")
web.Router("/v1/background/dictionary/search", &backgroud_client.DictionaryController{}, "Post:ListDictionary")
web.Router("/v1/background/dictionary/remove", &backgroud_client.DictionaryController{}, "Post:RemoveDictionary")
// menu
web.Router("/v1/background/menus/", &backgroud_client.MenuController{}, "Post:CreateMenu")
web.Router("/v1/background/menus/:menuId", &backgroud_client.MenuController{}, "Put:UpdateMenu")
web.Router("/v1/background/menus/:menuId", &backgroud_client.MenuController{}, "Get:GetMenu")
web.Router("/v1/background/menus/search", &backgroud_client.MenuController{}, "Post:SearchMenu")
web.Router("/v1/background/menus/batch-delete", &backgroud_client.MenuController{}, "Post:BatchDeleteMenu")
web.Router("/v1/background/menus/batch-enable", &backgroud_client.MenuController{}, "Post:BatchEnableMenu")
// company
//web.Router("/v1/background/company/", &backgroud_client.CompanyController{}, "Post:CreateCompany")
web.Router("/v1/background/company/:companyId", &backgroud_client.CompanyController{}, "Put:UpdateCompany")
web.Router("/v1/background/company/:companyId", &backgroud_client.CompanyController{}, "Get:GetCompany")
web.Router("/v1/background/company/search", &backgroud_client.CompanyController{}, "Post:SearchCompany")
web.Router("/v1/background/company/:companyId/audit", &backgroud_client.CompanyController{}, "Post:AuditCompany")
web.Router("/v1/background/company/:companyId/enable", &backgroud_client.CompanyController{}, "Post:EnableCompany")
// user
web.Router("/v1/background/user/search", &backgroud_client.UserController{}, "Post:SearchUser")
web.Router("/v1/background/user/enable", &backgroud_client.UserController{}, "Post:EnableUser")
web.Router("/v1/background/user/reset-password", &backgroud_client.UserController{}, "Post:ResetPassword")
// admin
web.Router("/v1/background/user-admin/search", &backgroud_client.UserController{}, "Post:SearchAdminUser")
web.Router("/v1/background/user-admin/:userId", &backgroud_client.UserController{}, "Get:GetAdminUser")
web.Router("/v1/background/user-admin/:userId", &backgroud_client.UserController{}, "Put:UpdateAdminUser")
web.Router("/v1/background/user-admin/", &backgroud_client.UserController{}, "Post:CreateAdminUser")
web.Router("/v1/background/user-admin/enable", &backgroud_client.UserController{}, "Post:EnableAdminUser")
web.Router("/v1/background/user-admin/reset-password", &backgroud_client.UserController{}, "Post:ResetPassword")
web.Router("/v1/background/auth/login/pwd", &backgroud_client.AuthController{}, "Post:LoginPwd")
web.Router("/v1/background/auth/user-info", &backgroud_client.UserController{}, "Post:GetAdminUserInfo")
web.Router("/v1/background/auth/user-menu", &web_client.MenuController{}, "Post:MenuSearch")
}