promotion_order.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package http
  2. import (
  3. rpcV1 "go-common/app/service/openplatform/ticket-sales/api/grpc/v1"
  4. bm "go-common/library/net/http/blademaster"
  5. )
  6. func checkCreatePromoOrder(c *bm.Context) {
  7. arg := new(rpcV1.CheckCreatePromoOrderRequest)
  8. if err := c.Bind(arg); err != nil {
  9. return
  10. }
  11. c.JSON(svc.CheckCreateStatus(c, arg))
  12. }
  13. func createPromoOrder(c *bm.Context) {
  14. arg := new(rpcV1.CreatePromoOrderRequest)
  15. if err := c.Bind(arg); err != nil {
  16. return
  17. }
  18. c.JSON(svc.CreatePromoOrder(c, arg))
  19. }
  20. func payNotify(c *bm.Context) {
  21. arg := new(rpcV1.OrderID)
  22. if err := c.Bind(arg); err != nil {
  23. return
  24. }
  25. c.JSON(svc.PromoPayNotify(c, arg))
  26. }
  27. func cancelOrder(c *bm.Context) {
  28. arg := new(rpcV1.OrderID)
  29. if err := c.Bind(arg); err != nil {
  30. return
  31. }
  32. c.JSON(svc.CancelOrder(c, arg))
  33. }
  34. func checkIssue(c *bm.Context) {
  35. arg := new(rpcV1.OrderID)
  36. if err := c.Bind(arg); err != nil {
  37. return
  38. }
  39. c.JSON(svc.CheckIssue(c, arg))
  40. }
  41. func finishIssue(c *bm.Context) {
  42. arg := new(rpcV1.FinishIssueRequest)
  43. if err := c.Bind(arg); err != nil {
  44. return
  45. }
  46. c.JSON(svc.FinishIssue(c, arg))
  47. }