talent_get_api.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package youngeetalentapi
  2. import (
  3. "youngmini_server/app/service/youngee_talent_service"
  4. "github.com/gogf/gf/net/ghttp"
  5. )
  6. var TalentGetApi = talentGetApi{}
  7. type talentGetApi struct {
  8. }
  9. // ListProject godoc
  10. // @BasePath /talent/g
  11. // @Summary GetProjectList
  12. // @Description GetProjectListInfo
  13. // @Tags Project
  14. // @Accept json
  15. // @Produce json
  16. // @Param idx query int true "index of page"
  17. // @Param cnt query int true "size of page"
  18. // @Param platform query string false "search by platform"
  19. // @Param mode query string false "search by mode"
  20. // @Success 200 {object} youngee_talent_model.ProjectInfoList
  21. // @Router /talent/g/get-project-list [get]
  22. func (*talentGetApi) GetProjectList(r *ghttp.Request) {
  23. res := youngee_talent_service.GetProjectInfoList(r)
  24. err := r.Response.WriteJson(res)
  25. if err != nil {
  26. panic("write response error")
  27. }
  28. }
  29. // GetInfoTables 获取所有信息表
  30. func (*talentGetApi) GetInfoTables(r *ghttp.Request) {
  31. res := youngee_talent_service.GetInfoTables()
  32. err := r.Response.WriteJson(res)
  33. if err != nil {
  34. panic("write response error")
  35. }
  36. }