SsoController.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package partial
  2. import (
  3. "git.qianqiusoft.com/qianqiusoft/light-apiengine/entitys"
  4. sysmodel "git.qianqiusoft.com/qianqiusoft/light-apiengine/models"
  5. //sysutils "git.qianqiusoft.com/qianqiusoft/light-apiengine/utils"
  6. "git.qianqiusoft.com/qianqiusoft/light-apiengine/models"
  7. )
  8. // _Login
  9. // @Title _Login
  10. // @Description 用户登录
  11. // @Param logininfo false "登录信息"
  12. // @Success 200 {object} Account
  13. // @Failure 403 :id is empty
  14. func Sso_Login(c *entitys.CtrlContext) {
  15. var paramObj0 models.LoginInfo
  16. c.Ctx.BindJSON(&paramObj0)
  17. ret := __none_func_sso__(paramObj0)
  18. if ret {
  19. c.Ctx.JSON(200, sysmodel.SysReturn{200, "", nil})
  20. }else{
  21. c.Ctx.JSON(500, sysmodel.SysReturn{500, "", nil})
  22. }
  23. }
  24. // _Logout
  25. // @Title _Logout
  26. // @Description 用户退出
  27. // @Success 200 {object} Account
  28. // @Failure 403 :id is empty
  29. func Sso_Logout(c *entitys.CtrlContext) {
  30. ret := __none_func_sso__()
  31. if ret {
  32. c.Ctx.JSON(200, sysmodel.SysReturn{200, "", nil})
  33. }else{
  34. c.Ctx.JSON(500, sysmodel.SysReturn{500, "", nil})
  35. }
  36. }
  37. func __none_func_sso__(params ... interface{}) bool{
  38. return true
  39. }