golang 的 rabbitmq 消费项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

152 lines
5.5 KiB

  1. package md
  2. import "applet/app/utils"
  3. // 拉新
  4. type AcquisitionCfg struct {
  5. Id string `json:"id"`
  6. Status string `json:"status"`
  7. Time int `json:"time"`
  8. StartTime string `json:"start_time"`
  9. EndTime string `json:"end_time"`
  10. SuccessConditions struct {
  11. Register struct {
  12. Open string `json:"open"`
  13. } `json:"register"`
  14. TaobaoAuthorization struct {
  15. Open string `json:"open"`
  16. } `json:"taobao_authorization"`
  17. BindPhone struct {
  18. Open string `json:"open"`
  19. } `json:"bind_phone"`
  20. FirstOrder struct {
  21. Open string `json:"open"`
  22. Day string `json:"day"`
  23. Status string `json:"status"`
  24. } `json:"first_order"`
  25. SelfOrder struct {
  26. Open string `json:"open"`
  27. Money string `json:"money"`
  28. } `json:"self_order"`
  29. OrderPay struct {
  30. Open string `json:"open"`
  31. Money string `json:"money"`
  32. } `json:"order_pay"`
  33. OrderStatus struct {
  34. Open string `json:"open"`
  35. Status string `json:"status"`
  36. } `json:"order_status"`
  37. } `json:"success_conditions"`
  38. RewardAccountDay string `json:"reward_account_day"`
  39. AdSetting struct {
  40. Status string `json:"status"`
  41. AdData string `json:"ad_data"`
  42. } `json:"ad_setting"`
  43. RewardRule struct {
  44. DirectTime string `json:"direct_time"`
  45. IndirectTime string `json:"indirect_time"`
  46. DirectSuccess string `json:"direct_success"`
  47. IndirectSuccess string `json:"indirect_success"`
  48. InvitedReward string `json:"invited_reward"`
  49. DirectSuccessMax string `json:"direct_success_max"`
  50. IndirectSuccessMax string `json:"indirect_success_max"`
  51. InvitedRewardMax string `json:"invited_reward_max"`
  52. RewardType string `json:"reward_type"`
  53. RewardCoinId string `json:"reward_coin_id"`
  54. NewRewardCoinId string `json:"new_reward_coin_id"`
  55. CoinList []RewardRuleCoinList `json:"coin_list"`
  56. } `json:"reward_rule"`
  57. ExtraRewardSetting struct {
  58. Status string `json:"status"`
  59. RewardStep []struct {
  60. Number string `json:"number"`
  61. Money string `json:"money"`
  62. Lv string `json:"lv"`
  63. CoinList []ExtraRewardSettingCoinList `json:"coin_list"`
  64. } `json:"reward_step"`
  65. } `json:"extra_reward_setting"`
  66. RankRule struct {
  67. Status string `json:"status"`
  68. ActivityCycle string `json:"activity_cycle"`
  69. EndTime string `json:"end_time"`
  70. RankData string `json:"rank_data"`
  71. FirstAwardMoney string `json:"first_award_money"`
  72. SecondAwardMoney string `json:"second_award_money"`
  73. ThirdAwardMoney string `json:"third_award_money"`
  74. FirstAwardExtendCount string `json:"first_award_extend_count"`
  75. SecondAwardExtendCount string `json:"second_award_extend_count"`
  76. ThirdAwardExtendCount string `json:"third_award_extend_count"`
  77. CoinList []RankRuleCoinList `json:"coin_list"`
  78. } `json:"rank_rule"`
  79. RankData string `json:"rank_data"`
  80. }
  81. type ExtraRewardSettingCoinList struct {
  82. CoinId string `json:"coin_id"`
  83. Money string `json:"money"`
  84. }
  85. type RankRuleCoinList struct {
  86. CoinId string `json:"coin_id"`
  87. FirstAwardMoney string `json:"first_award_money"`
  88. SecondAwardMoney string `json:"second_award_money"`
  89. ThirdAwardMoney string `json:"third_award_money"`
  90. }
  91. type RewardRuleCoinList struct {
  92. CoinId string `json:"coin_id"`
  93. DirectSuccess string `json:"direct_success"`
  94. IndirectSuccess string `json:"indirect_success"`
  95. InvitedReward string `json:"invited_reward"`
  96. DirectSuccessMax string `json:"direct_success_max"`
  97. IndirectSuccessMax string `json:"indirect_success_max"`
  98. InvitedRewardMax string `json:"invited_reward_max"`
  99. }
  100. type AcquisitionRankModData struct {
  101. CommonStyle struct {
  102. RankTitleImg string `json:"rank_title_img"`
  103. BackTitleImg string `json:"back_title_img"`
  104. HeadTitleImg string `json:"head_title_img"`
  105. FirstImg string `json:"first_img"`
  106. SecondImg string `json:"second_img"`
  107. ThirdImg string `json:"third_img"`
  108. FirstRewardImg string `json:"first_reward_img"`
  109. SecondRewardImg string `json:"second_reward_img"`
  110. ThirdRewardImg string `json:"third_reward_img"`
  111. } `json:"common_style"`
  112. VirtualUsers []AcquisitionRankVirtualUser `json:"virtual_users"`
  113. }
  114. type AcquisitionRankVirtualUser struct {
  115. HeadImg string `json:"head_img"`
  116. Name string `json:"name"`
  117. VirtualMoney string `json:"virtual_money"`
  118. Status string `json:"status"`
  119. }
  120. type AcquisitionRankUser struct {
  121. AvatarUrl string `json:"avatar_url"`
  122. Username string `json:"username"`
  123. Money string `json:"money"`
  124. Count string `json:"count"`
  125. Uid string `json:"uid"`
  126. }
  127. type AcquisitionRankUserList []AcquisitionRankUser
  128. func (p AcquisitionRankUserList) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
  129. func (p AcquisitionRankUserList) Len() int { return len(p) }
  130. func (p AcquisitionRankUserList) Less(i, j int) bool {
  131. iMoney := utils.AnyToFloat64(p[i].Money)
  132. jMoney := utils.AnyToFloat64(p[j].Money)
  133. return iMoney > jMoney
  134. }
  135. const (
  136. AcqRegister = "register"
  137. AcqTaobaoAuth = "taobaoAuth"
  138. AcqFirstOrder = "firstOrder"
  139. KaoLaCtrl = "kaola"
  140. MeituanCtrl = "meituan"
  141. OilCtrl = "oil"
  142. KfcCtrl = "kfc"
  143. CinemaCtrl = "cinema"
  144. )