shop.go 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. package msg
  2. import (
  3. "leafstalk/covenant/model"
  4. )
  5. type StoreSummary struct {
  6. PlayerId int64 `json:"userId"`
  7. ClientPlat string `json:"clientPlat"`
  8. }
  9. type ResponseStoreSummary struct {
  10. ErrCode int `json:"errCode"`
  11. Msg string `json:"msg,omitempty"`
  12. Data *StoreSummaryData `json:"data"`
  13. }
  14. type StoreSummaryData struct {
  15. Buys map[int64]int `json:"dailyBuys"` //已购商品
  16. Refresh map[int64]*model.RefreshGoods `json:"refresh"` //商品ID列表
  17. }
  18. // BuyItem gou
  19. type BuyItem struct {
  20. PlayerId int64 `json:"userId"`
  21. PayType int64 `json:"payType"`
  22. GoodsId int64 `json:"id"`
  23. Num int64 `json:"num"`
  24. ClientPlat string `json:"clientPlat"`
  25. }
  26. // type TreasureLevelUpData struct{}
  27. type ResponseBuyItem struct {
  28. ErrCode int `json:"errCode"`
  29. Msg string `json:"msg,omitempty"`
  30. Data int `json:"data"`
  31. }
  32. // 创建订单
  33. type NewOrder struct {
  34. PlayerId int64 `json:"userId"`
  35. Platform int `json:"platform"` //微信:1; 抖音:2; quick: 3;
  36. GoodsId int64 `json:"goodsId"`
  37. PayMethod int `json:"midasPay"` //0:苹果游戏外微信支付 1:安卓游戏内支付 2:安卓游戏外微信支付 3:苹果游戏内支付
  38. Level int `json:"level"`
  39. OpenId string `json:"openId"`
  40. ClientPlat string `json:"clientPlat"`
  41. }
  42. type ResponseNewOrder struct {
  43. ErrCode int `json:"errCode"`
  44. Msg string `json:"msg,omitempty"`
  45. Data *NewOrderData `json:"data"`
  46. }
  47. type NewOrderData struct {
  48. OrderID string `json:"orderID"`
  49. Url string `json:"callUrl"`
  50. }
  51. // 取消订单
  52. type CancleOrder struct {
  53. PlayerID int64 `json:"userId"`
  54. OrderID string `json:"orderID"`
  55. Platform int `json:"platform"` // 购买平台 微信:1; 抖音:2 quick 3
  56. ClientPlat string `json:"clientPlat"`
  57. }
  58. type ResponseCancleOrder struct {
  59. ErrCode int `json:"errCode"`
  60. Data string `json:"data"`
  61. }
  62. type QueryOrder struct {
  63. PlayerID int64 `json:"userId"`
  64. OrderID string `json:"orderID"`
  65. MidasPay int `json:"midasPay"`
  66. }
  67. // type ResponseQueryOrder struct {
  68. // ErrCode int `json:"errCode"`
  69. // //Data *PayBuyData `json:"data"`
  70. // }
  71. type AndroidPayedNotify struct {
  72. GoodsID int64 `json:"goodsId"`
  73. OrderID string `json:"orderID"`
  74. }
  75. // 支付购买
  76. type PayBuy struct {
  77. PlayerID int64 `json:"userId"`
  78. Platform int `json:"platform"` // 购买平台 微信:1; 抖音:2 quick 3
  79. GoodsID int64 `json:"goodsId"`
  80. OrderID string `json:"orderID"`
  81. Level int `json:"level"`
  82. Num int64 `json:"num"` //发送本消息次数
  83. ClientPlat string `json:"clientPlat"`
  84. }
  85. // type ResponsePayBuy struct {
  86. // ErrCode int `json:"errCode"`
  87. // Msg string `json:"msg,omitempty"`
  88. // Data *PayBuyData `json:"data"`
  89. // }
  90. // type PayBuyData struct {
  91. // GoodsId int64 `json:"goodsId"`
  92. // Diamond int `json:"diamond"`
  93. // Materials []*model.DropMaterial `json:"materials"`
  94. // Equipments []*model.DropEquipment `json:"equipments"`
  95. // Buffs *VipBuffData `json:"buffs"`
  96. // }
  97. // // TreasureStarUp 升星
  98. // type TreasureStarUp struct {
  99. // PlayerId int64 `json:"userId"`
  100. // Id int64 `json:"id"`
  101. // }
  102. // type TreasureStarUpData struct{}
  103. // type ResponseTreasureStarUp struct {
  104. // ErrCode int `json:"errCode"`
  105. // Msg string `json:"msg,omitempty"`
  106. // Data *TreasureLevelUpData `json:"data"`
  107. // }