|
|
@@ -23,8 +23,8 @@ func NewSystemController(c *gin.Context, e *engine.ApiEngine) *SystemController
|
|
|
|
|
|
// Login
|
|
|
// @Title Login
|
|
|
-// @Description 用户登录
|
|
|
-// @Param logininfo false "登录信息"
|
|
|
+// @Description 用户登录
|
|
|
+// @Param logininfo false "登录信息"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /login [post,get,put]
|
|
|
@@ -35,7 +35,7 @@ func (c *SystemController) Login() {
|
|
|
|
|
|
// Logout
|
|
|
// @Title Logout
|
|
|
-// @Description 用户退出
|
|
|
+// @Description 用户退出
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /logout [post,get]
|
|
|
@@ -46,8 +46,8 @@ func (c *SystemController) Logout() {
|
|
|
|
|
|
// GetNavTree
|
|
|
// @Title GetNavTree
|
|
|
-// @Description 获取导航菜单
|
|
|
-// @Param user string false "用户id"
|
|
|
+// @Description 获取导航菜单
|
|
|
+// @Param user string false "用户id"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /get_nav_tree [post,get]
|
|
|
@@ -58,8 +58,8 @@ func (c *SystemController) GetNavTree() {
|
|
|
|
|
|
// GetMenuTree
|
|
|
// @Title GetMenuTree
|
|
|
-// @Description 获取系统菜单
|
|
|
-// @Param user string false "用户id"
|
|
|
+// @Description 获取系统菜单
|
|
|
+// @Param user string false "用户id"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /get_menu_tree [post,get]
|
|
|
@@ -70,8 +70,8 @@ func (c *SystemController) GetMenuTree() {
|
|
|
|
|
|
// FindUserPage
|
|
|
// @Title FindUserPage
|
|
|
-// @Description 获取用户分布数据
|
|
|
-// @Param page false "分页参数"
|
|
|
+// @Description 获取用户分布数据
|
|
|
+// @Param page false "分页参数"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /find_user_page [post,get]
|
|
|
@@ -82,7 +82,7 @@ func (c *SystemController) FindUserPage() {
|
|
|
|
|
|
// GetOrgTree
|
|
|
// @Title GetOrgTree
|
|
|
-// @Description 获取组织架构树
|
|
|
+// @Description 获取组织架构树
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /get_org_tree [post,get]
|
|
|
@@ -93,11 +93,11 @@ func (c *SystemController) GetOrgTree() {
|
|
|
|
|
|
// AddUser
|
|
|
// @Title AddUser
|
|
|
-// @Description 添加用户
|
|
|
-// @Param login_id string false "登录ID"
|
|
|
-// @Param password string false "密码"
|
|
|
-// @Param org_id string false "组织ID"
|
|
|
-// @Param email string false "邮箱"
|
|
|
+// @Description 添加用户
|
|
|
+// @Param login_id string false "登录ID"
|
|
|
+// @Param password string false "密码"
|
|
|
+// @Param org_id string false "组织ID"
|
|
|
+// @Param email string false "邮箱"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /add_user [post,get,put]
|
|
|
@@ -108,8 +108,8 @@ func (c *SystemController) AddUser() {
|
|
|
|
|
|
// DelUser
|
|
|
// @Title DelUser
|
|
|
-// @Description 删除用户
|
|
|
-// @Param id string false "用户ID"
|
|
|
+// @Description 删除用户
|
|
|
+// @Param id string false "用户ID"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /del_user [post,get,put]
|
|
|
@@ -120,11 +120,11 @@ func (c *SystemController) DelUser() {
|
|
|
|
|
|
// UpdateUser
|
|
|
// @Title UpdateUser
|
|
|
-// @Description 修改用户
|
|
|
-// @Param login_id string false "登录ID"
|
|
|
-// @Param password string false "密码"
|
|
|
-// @Param org_id string false "组织ID"
|
|
|
-// @Param email string false "邮箱"
|
|
|
+// @Description 修改用户
|
|
|
+// @Param login_id string false "登录ID"
|
|
|
+// @Param password string false "密码"
|
|
|
+// @Param org_id string false "组织ID"
|
|
|
+// @Param email string false "邮箱"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /update_user [post,get,put]
|
|
|
@@ -135,9 +135,9 @@ func (c *SystemController) UpdateUser() {
|
|
|
|
|
|
// AddRole
|
|
|
// @Title AddRole
|
|
|
-// @Description 添加角色
|
|
|
-// @Param name string false "角色名称"
|
|
|
-// @Param remark string false "备注"
|
|
|
+// @Description 添加角色
|
|
|
+// @Param name string false "角色名称"
|
|
|
+// @Param remark string false "备注"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /add_role [post,get,put]
|
|
|
@@ -148,8 +148,8 @@ func (c *SystemController) AddRole() {
|
|
|
|
|
|
// DelRole
|
|
|
// @Title DelRole
|
|
|
-// @Description 添加角色
|
|
|
-// @Param id string false "角色ID"
|
|
|
+// @Description 添加角色
|
|
|
+// @Param id string false "角色ID"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /del_role [post,get,put]
|
|
|
@@ -160,10 +160,10 @@ func (c *SystemController) DelRole() {
|
|
|
|
|
|
// UpdateRole
|
|
|
// @Title UpdateRole
|
|
|
-// @Description 修改角色
|
|
|
-// @Param id string false "角色ID"
|
|
|
-// @Param name string false "角色名称"
|
|
|
-// @Param remark string false "备注"
|
|
|
+// @Description 修改角色
|
|
|
+// @Param id string false "角色ID"
|
|
|
+// @Param name string false "角色名称"
|
|
|
+// @Param remark string false "备注"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /update_role [post,get,put]
|
|
|
@@ -174,8 +174,8 @@ func (c *SystemController) UpdateRole() {
|
|
|
|
|
|
// FindRolePage
|
|
|
// @Title FindRolePage
|
|
|
-// @Description 角色分页
|
|
|
-// @Param page false "分页参数"
|
|
|
+// @Description 角色分页
|
|
|
+// @Param page false "分页参数"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /find_role_page [post,get,put]
|
|
|
@@ -186,8 +186,8 @@ func (c *SystemController) FindRolePage() {
|
|
|
|
|
|
// FindRoleMenu
|
|
|
// @Title FindRoleMenu
|
|
|
-// @Description 查找角色权限
|
|
|
-// @Param role_id string false "角色id"
|
|
|
+// @Description 查找角色权限
|
|
|
+// @Param role_id string false "角色id"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /find_role_menu [post,get,put]
|
|
|
@@ -198,8 +198,8 @@ func (c *SystemController) FindRoleMenu() {
|
|
|
|
|
|
// SaveRoleMenu
|
|
|
// @Title SaveRoleMenu
|
|
|
-// @Description 保存角色权限
|
|
|
-// @Param role_menu string false "角色权限"
|
|
|
+// @Description 保存角色权限
|
|
|
+// @Param role_menu string false "角色权限"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /save_role_menu [post,get,put]
|
|
|
@@ -210,7 +210,7 @@ func (c *SystemController) SaveRoleMenu() {
|
|
|
|
|
|
// RoleAll
|
|
|
// @Title RoleAll
|
|
|
-// @Description 查找所有角色
|
|
|
+// @Description 查找所有角色
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /role_all [post,get,put]
|
|
|
@@ -221,7 +221,7 @@ func (c *SystemController) RoleAll() {
|
|
|
|
|
|
// FindPermissions
|
|
|
// @Title FindPermissions
|
|
|
-// @Description 查找用户权限
|
|
|
+// @Description 查找用户权限
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /find_permissions [post,get,put]
|
|
|
@@ -232,8 +232,8 @@ func (c *SystemController) FindPermissions() {
|
|
|
|
|
|
// AddMenu
|
|
|
// @Title AddMenu
|
|
|
-// @Description 添加菜单
|
|
|
-// @Param string false "菜单"
|
|
|
+// @Description 添加菜单
|
|
|
+// @Param string false "菜单"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /add_menu [post,get,put]
|
|
|
@@ -244,8 +244,8 @@ func (c *SystemController) AddMenu() {
|
|
|
|
|
|
// DelMenu
|
|
|
// @Title DelMenu
|
|
|
-// @Description 删除菜单
|
|
|
-// @Param id string false "菜单ID"
|
|
|
+// @Description 删除菜单
|
|
|
+// @Param id string false "菜单ID"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /del_menu [post,get,put]
|
|
|
@@ -256,8 +256,8 @@ func (c *SystemController) DelMenu() {
|
|
|
|
|
|
// UpdateMenu
|
|
|
// @Title UpdateMenu
|
|
|
-// @Description 更新菜单
|
|
|
-// @Param string false "菜单"
|
|
|
+// @Description 更新菜单
|
|
|
+// @Param string false "菜单"
|
|
|
// @Success 200 {object} models.Account
|
|
|
// @Failure 403 :id is empty
|
|
|
// @router /update_menu [post,get,put]
|
|
|
@@ -266,3 +266,63 @@ func (c *SystemController) UpdateMenu() {
|
|
|
System_UpdateMenu(c)
|
|
|
}
|
|
|
|
|
|
+// AddOrg
|
|
|
+// @Title AddOrg
|
|
|
+// @Description 添加组织
|
|
|
+// @Param string false "组织"
|
|
|
+// @Success 200 {object} models.Account
|
|
|
+// @Failure 403 :id is empty
|
|
|
+// @router /add_org [post,get,put]
|
|
|
+func (c *SystemController) AddOrg() {
|
|
|
+ //
|
|
|
+ System_AddOrg(c)
|
|
|
+}
|
|
|
+
|
|
|
+// DelOrg
|
|
|
+// @Title DelOrg
|
|
|
+// @Description 删除组织
|
|
|
+// @Param id string false "组织ID"
|
|
|
+// @Success 200 {object} models.Account
|
|
|
+// @Failure 403 :id is empty
|
|
|
+// @router /del_org [post,get,put]
|
|
|
+func (c *SystemController) DelOrg() {
|
|
|
+ //
|
|
|
+ System_DelOrg(c)
|
|
|
+}
|
|
|
+
|
|
|
+// UpdateOrg
|
|
|
+// @Title UpdateOrg
|
|
|
+// @Description 更新组织
|
|
|
+// @Param string false "组织"
|
|
|
+// @Success 200 {object} models.Account
|
|
|
+// @Failure 403 :id is empty
|
|
|
+// @router /update_org [post,get,put]
|
|
|
+func (c *SystemController) UpdateOrg() {
|
|
|
+ //
|
|
|
+ System_UpdateOrg(c)
|
|
|
+}
|
|
|
+
|
|
|
+// GetOrg
|
|
|
+// @Title GetOrg
|
|
|
+// @Description 根据ID获取组织
|
|
|
+// @Param string false "组织"
|
|
|
+// @Success 200 {object} models.Account
|
|
|
+// @Failure 403 :id is empty
|
|
|
+// @router /get_org [post,get,put]
|
|
|
+func (c *SystemController) GetOrg() {
|
|
|
+ //
|
|
|
+ System_GetOrg(c)
|
|
|
+}
|
|
|
+
|
|
|
+// UpdateOrg
|
|
|
+// @Title UpdateOrg
|
|
|
+// @Description 更新组织
|
|
|
+// @Param string false "组织"
|
|
|
+// @Success 200 {object} models.Account
|
|
|
+// @Failure 403 :id is empty
|
|
|
+// @router /page_org [post,get,put]
|
|
|
+func (c *SystemController) PageOrg() {
|
|
|
+ //
|
|
|
+ System_PageOrg(c)
|
|
|
+}
|
|
|
+
|