area.go 668 B

123456789101112131415161718192021222324252627
  1. package http
  2. import (
  3. item "go-common/app/service/openplatform/ticket-item/api/grpc/v1"
  4. "go-common/app/service/openplatform/ticket-item/model"
  5. bm "go-common/library/net/http/blademaster"
  6. "github.com/pkg/errors"
  7. )
  8. // @params AreaInfoParam
  9. // @router post /openplatform/internal/ticket/item/areaInfo
  10. // @response AreaInfoReply
  11. func areaInfo(c *bm.Context) {
  12. arg := new(model.AreaInfoParam)
  13. if err := c.Bind(arg); err != nil {
  14. errors.Wrap(err, "参数验证失败")
  15. return
  16. }
  17. c.JSON(itemSvc.AreaInfo(c, &item.AreaInfoRequest{
  18. ID: arg.ID,
  19. AID: arg.AID,
  20. Name: arg.Name,
  21. Place: arg.Place,
  22. Coordinate: arg.Coordinate,
  23. }))
  24. }