research_group.go 767 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package controllers
  2. import (
  3. "eta_gn/eta_api/models"
  4. )
  5. type ResearchGroupController struct {
  6. BaseAuthController
  7. }
  8. // @router /research_group/list [get]
  9. func (this *ResearchGroupController) GetResearchGroupList() {
  10. br := new(models.BaseResponse).Init()
  11. defer func() {
  12. this.Data["json"] = br
  13. this.ServeJSON()
  14. }()
  15. br.Ret = 200
  16. br.Success = true
  17. br.Msg = "操作成功"
  18. return
  19. }
  20. // @router /research_group/admin_group [get]
  21. func (this *ResearchGroupController) GetAdminResearchGroup() {
  22. br := new(models.BaseResponse).Init()
  23. defer func() {
  24. this.Data["json"] = br
  25. this.ServeJSON()
  26. }()
  27. adminId, _ := this.GetInt("AdminId")
  28. if adminId == 0 {
  29. br.Msg = "参数有误"
  30. return
  31. }
  32. br.Ret = 200
  33. br.Success = true
  34. br.Msg = "获取成功"
  35. return
  36. }