panel.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. package http
  2. import (
  3. "go-common/app/service/main/vip/model"
  4. "go-common/library/log"
  5. bm "go-common/library/net/http/blademaster"
  6. )
  7. func vipUserMonthPanel(c *bm.Context) {
  8. arg := new(model.ArgVipConfigMonth)
  9. if err := c.Bind(arg); err != nil {
  10. return
  11. }
  12. plat := vipSvc.GetPlatID(c, arg.Platform, arg.PanelType, arg.MobiApp, arg.Device, 0)
  13. c.JSON(vipSvc.VipUserPrice(c, arg.Mid, arg.Month, plat, arg.SubType, arg.IgnoreAutoRenewStatus, arg.Build))
  14. }
  15. func vipPirce(c *bm.Context) {
  16. arg := new(model.ArgVipConfigMonth)
  17. if err := c.Bind(arg); err != nil {
  18. log.Error("c.Bind err(%+v)", err)
  19. return
  20. }
  21. plat := vipSvc.GetPlatID(c, arg.Platform, arg.PanelType, arg.MobiApp, arg.Device, 0)
  22. c.JSON(vipSvc.VipPrice(c, arg.Mid, arg.Month, plat, arg.SubType, arg.CouponToken, arg.Platform, arg.Build))
  23. }
  24. func priceceByProductID(c *bm.Context) {
  25. arg := new(model.ArgPriceByProduct)
  26. if err := c.Bind(arg); err != nil {
  27. return
  28. }
  29. c.JSON(vipSvc.PriceByProductID(c, arg.ProductID))
  30. }
  31. func priceceByID(c *bm.Context) {
  32. arg := new(model.ArgVipPriceByID)
  33. if err := c.Bind(arg); err != nil {
  34. return
  35. }
  36. c.JSON(vipSvc.VipPriceByID(c, arg))
  37. }