app_staff.go 405 B

12345678910111213141516171819202122
  1. package http
  2. import (
  3. "go-common/library/ecode"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. func arcStaff(c *bm.Context) {
  7. v := new(struct {
  8. AID int64 `form:"aid" validate:"required"`
  9. Cache bool `form:"cache"`
  10. })
  11. if err := c.Bind(v); err != nil {
  12. return
  13. }
  14. res, err := pubSvc.StaffList(c, v.AID, v.Cache)
  15. if err != nil {
  16. c.JSON(nil, ecode.RequestErr)
  17. return
  18. }
  19. c.JSON(res, nil)
  20. }