location.go 546 B

123456789101112131415161718192021222324252627
  1. package http
  2. import (
  3. http "go-common/app/interface/bbq/app-bbq/api/http/v1"
  4. bm "go-common/library/net/http/blademaster"
  5. "github.com/pkg/errors"
  6. )
  7. func locationAll(c *bm.Context) {
  8. arg := new(http.LocationRequest)
  9. if err := c.Bind(arg); err != nil {
  10. errors.Wrap(err, "参数验证失败")
  11. return
  12. }
  13. c.JSON(srv.GetLocaitonAll(c, arg))
  14. }
  15. func location(c *bm.Context) {
  16. arg := new(http.LocationRequest)
  17. if err := c.Bind(arg); err != nil {
  18. errors.Wrap(err, "参数验证失败")
  19. return
  20. }
  21. c.JSON(srv.GetLocationChild(c, arg))
  22. }