| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- package controllers
- import (
- "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__(logininfo)
- if ret {
- c.Ctx.JSON(200, models.SysReturn{200, "", nil})
- }else{
- c.Ctx.JSON(200, models.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__()
- if ret {
- c.Ctx.JSON(200, models.SysReturn{200, "", nil})
- }else{
- c.Ctx.JSON(200, models.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__(user)
- if ret {
- c.Ctx.JSON(200, models.SysReturn{200, "", nil})
- }else{
- c.Ctx.JSON(200, models.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__(getpageinfo)
- if ret {
- c.Ctx.JSON(200, models.SysReturn{200, "", nil})
- }else{
- c.Ctx.JSON(200, models.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__(user)
- if ret {
- c.Ctx.JSON(200, models.SysReturn{200, "", nil})
- }else{
- c.Ctx.JSON(200, models.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__(user)
- if ret {
- c.Ctx.JSON(200, models.SysReturn{200, "", nil})
- }else{
- c.Ctx.JSON(200, models.SysReturn{500, "", nil})
- }
- }
- func __none_func__(params ... interface{}) bool{
- return true
- }
|