user_router.go 1.9 KB
package routers

import (
	"github.com/beego/beego/v2/server/web"
	"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"
)

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-org", &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/app/orgs/department-users", &mobile_client.UserController{}, "Post:DepartmentUsers")
	web.Router("/v1/web/orgs/department-users", &web_client.OrgController{}, "Post:DepartmentUsers")
}