guest.go 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package http
  2. import (
  3. "go-common/app/service/openplatform/ticket-item/model"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. /** test http
  7. func guestInfo(c *bm.Context) {
  8. arg := new(model.GuestParam)
  9. if err := c.Bind(arg); err != nil {
  10. errors.Wrap(err, "参数验证失败")
  11. return
  12. }
  13. c.JSON(itemSvc.GuestInfo(c, &model.GuestInfoRequest{ID: arg.ID, Name: arg.Name, GuestImg: arg.GuestImg, Description: arg.Description, GuestID: arg.GuestID}))
  14. }
  15. func guestStatus(c *bm.Context) {
  16. arg := new(model.GuestStatusParam)
  17. if err := c.Bind(arg); err != nil {
  18. errors.Wrap(err, "参数验证失败")
  19. return
  20. }
  21. c.JSON(itemSvc.GuestStatus(c, arg.ID, arg.Status))
  22. }**/
  23. // @params ParamID
  24. // @router get /openplatform/internal/ticket/item/getguests
  25. // @response Guest
  26. /**func getGuests(c *bm.Context) {
  27. arg := new(model.ParamID)
  28. if err := c.Bind(arg); err != nil {
  29. errors.Wrap(err, "参数验证失败")
  30. return
  31. }
  32. c.JSON(itemSvc.GetGuests(c, &arg.ID))
  33. }**/
  34. // @params GuestSearchParam
  35. // @router get /openplatform/internal/ticket/item/guest/search
  36. // @response GuestSearchList
  37. func guestSearch(c *bm.Context) {
  38. arg := new(model.GuestSearchParam)
  39. if err := c.Bind(arg); err != nil {
  40. return
  41. }
  42. c.JSON(itemSvc.GuestSearch(c, arg))
  43. }