user_router.go
2.5 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
package routers
import (
"github.com/beego/beego/v2/server/web"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/domain"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/infrastructure/service_gateway/allied_creation_user"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers/mobile_client"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/controllers/web_client"
"gitlab.fjmaimaimai.com/allied-creation/allied-creation-gateway/pkg/port/beego/middleware"
)
func init() {
web.Router("/v1/user/company-orgs", &controllers.AuthController{}, "Post:GetCompanyOrgsByUser")
web.Router("/v1/user/user-info", &controllers.AuthController{}, "Post:GetUserInfo")
web.Router("/v1/user/user-orgs", &controllers.AuthController{}, "Post:GetUserOrg")
web.Router("/v1/user/user-menu", &controllers.AuthController{}, "Post:GetUserMenus")
web.Router("/v1/user/favorite-menus", &controllers.AuthController{}, "Get:GetFavoriteMenus")
web.Router("/v1/user/favorite-menus", &mobile_client.UserController{}, "Post:UpdateMenuFavorite")
web.Router("/v1/user/favorite", &mobile_client.UserController{}, "Post:UpdateOrgFavorite")
web.Router("/v1/user/change-password", &mobile_client.UserController{}, "Post:ChangePassword")
web.Router("/v1/user/change-phone", &mobile_client.UserController{}, "Post:ChangePhone")
web.Router("/v1/user/personal", &mobile_client.UserController{}, "Post:UpdateUserInfo")
web.Router("/v1/user/destroy-account", &mobile_client.UserController{}, "Post:DestroyAccount")
web.Router("/v1/user/department-users", &mobile_client.UserController{}, "Post:DepartmentUsers")
web.Router("/v1/user/msgs", &mobile_client.UserController{}, "Post:Messages")
web.Router("/v1/user/msgs/mark-read", &mobile_client.UserController{}, "Post:MessagesMarkRead")
web.Router("/v1/user/cooperation-org", &mobile_client.UserController{}, "Post:CooperationOrg")
// 特殊处理
web.Router("/v1/user/department-users", &mobile_client.UserController{}, "Post:DepartmentUsers") //公用的
web.Router("/v1/app/orgs/department-users", &mobile_client.UserController{}, "Post:DepartmentUsers")
web.Router("/v1/web/orgs/department-users", &web_client.OrgController{}, "Post:DepartmentUsers")
web.Post("/v1/user/sync-to-attendance-machine", middleware.RedirectInternalService("/v1", allied_creation_user.NewHttplibAlliedCreationUser(domain.Operator{})))
}