package controllers import ( "git.qianqiusoft.com/qianqiusoft/light-apiengine/models" sysmodel "git.qianqiusoft.com/qianqiusoft/light-apiengine/models" ) // _Login // @Title _Login // @Description 用户登录 // @Param logininfo false "登录信息" // @Success 200 {object} models.Account // @Failure 403 :id is empty func System_Login(c *SystemController) { var logininfo models.LoginInfo c.Ctx.BindJSON(&logininfo) ret := __none_func_system__(logininfo) if ret { c.Ctx.JSON(200, sysmodel.SysReturn{200, "", nil}) }else{ c.Ctx.JSON(200, sysmodel.SysReturn{500, "", nil}) } } // _Logout // @Title _Logout // @Description 用户退出 // @Success 200 {object} models.Account // @Failure 403 :id is empty func System_Logout(c *SystemController) { ret := __none_func_system__() if ret { c.Ctx.JSON(200, sysmodel.SysReturn{200, "", nil}) }else{ c.Ctx.JSON(200, sysmodel.SysReturn{500, "", nil}) } } // _GetMenuTree // @Title _GetMenuTree // @Description 获取系统菜单 // @Param user string false "用户id" // @Success 200 {object} models.Account // @Failure 403 :id is empty func System_GetMenuTree(c *SystemController) { user := c.Ctx.Param(":user") ret := __none_func_system__(user) if ret { c.Ctx.JSON(200, sysmodel.SysReturn{200, "", nil}) }else{ c.Ctx.JSON(200, sysmodel.SysReturn{500, "", nil}) } } // _FindUserPage // @Title _FindUserPage // @Description 获取用户分布数据 // @Param page false "分页参数" // @Success 200 {object} models.Account // @Failure 403 :id is empty func System_FindUserPage(c *SystemController) { var getpageinfo models.GetPageInfo c.Ctx.BindJSON(&getpageinfo) ret := __none_func_system__(getpageinfo) if ret { c.Ctx.JSON(200, sysmodel.SysReturn{200, "", nil}) }else{ c.Ctx.JSON(200, sysmodel.SysReturn{500, "", nil}) } } // _GetOrgTree // @Title _GetOrgTree // @Description 获取组织架构树 // @Success 200 {object} models.Account // @Failure 403 :id is empty func System_GetOrgTree(c *SystemController) { ret := __none_func_system__() if ret { c.Ctx.JSON(200, sysmodel.SysReturn{200, "", nil}) }else{ c.Ctx.JSON(200, sysmodel.SysReturn{500, "", nil}) } } // _FindPermissions // @Title _FindPermissions // @Description 查找用户的菜单权限标识集合 // @Param user string false "用户id" // @Success 200 {object} models.Account // @Failure 403 :id is empty func System_FindPermissions(c *SystemController) { user := c.Ctx.Param(":user") ret := __none_func_system__(user) if ret { c.Ctx.JSON(200, sysmodel.SysReturn{200, "", nil}) }else{ c.Ctx.JSON(200, sysmodel.SysReturn{500, "", nil}) } } // _AddPermission // @Title _AddPermission // @Description 查找用户的菜单权限标识集合 // @Param user string false "用户id" // @Success 200 {object} models.Account // @Failure 403 :id is empty func System_AddPermission(c *SystemController) { user := c.Ctx.Param(":user") ret := __none_func_system__(user) if ret { c.Ctx.JSON(200, sysmodel.SysReturn{200, "", nil}) }else{ c.Ctx.JSON(200, sysmodel.SysReturn{500, "", nil}) } } func __none_func_system__(params ... interface{}) bool{ return true }