selection_api.go 583 B

12345678910111213141516171819202122232425
  1. package selection
  2. import (
  3. "github.com/gogf/gf/net/ghttp"
  4. "youngmini_server/library/response"
  5. )
  6. var Selection = selectionApi{}
  7. type selectionApi struct{}
  8. func (*selectionApi) List(r *ghttp.Request) {
  9. var req ListSelectionReq
  10. req.PageIndex = r.GetInt("idx")
  11. req.CntPerPage = r.GetInt("cnt")
  12. req.Platform = r.GetString("platform")
  13. req.SearchValue = r.GetString("searchvalue")
  14. req.SecForm = r.GetString("secform")
  15. req.TaskForm = r.GetString("taskform")
  16. if res, err := service.List(r); err != nil {
  17. response.Code(r, err)
  18. } else {
  19. response.SuccessWithData(r, res)
  20. }
  21. }