bizConstant.go 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package base
  2. type BusinessType struct {
  3. BusinessNumber int // 业务场景编号
  4. BusinessName string // 场景名称
  5. ContextName string //上下文名
  6. ContextValue string // 上下文值
  7. Desc string // 备注信息
  8. }
  9. func BsById(i int) *BusinessType {
  10. if v, ok := businessNumberMap[i]; ok {
  11. return &BusinessType{
  12. BusinessNumber: i,
  13. BusinessName: v,
  14. }
  15. }
  16. return &BusinessType{
  17. BusinessNumber: UnknownNumber,
  18. BusinessName: businessNumberMap[UnknownNumber],
  19. }
  20. }
  21. var BillBsMap = map[int]string{
  22. BsDeposit: "充值",
  23. BsWithdraw: "提现",
  24. BsStaticProfit: "静态奖励",
  25. BsDirectProfit: "直推奖励",
  26. BsInviteProfit: "间推奖励",
  27. BsEqualProfit: "平级奖励",
  28. BsTeamProfit: "团队奖励",
  29. BsDaoProfit: "DAO收益",
  30. BsFundOrganizationProfit: "基金会收益",
  31. BsLeaderProfit: "DAO团队长收益",
  32. BsAgentProfit: "DAO代理收益",
  33. BsPartnerProfit: "DAO合伙人收益",
  34. }
  35. var businessNumberMap = map[int]string{
  36. UnknownNumber: "未知",
  37. BsDeposit: "充值",
  38. BsWithdraw: "提现",
  39. BsDistribution: "分发",
  40. BsSysDeduction: "系统划扣",
  41. BsJoinGroup: "参团",
  42. BsCancelGroup: "撤团",
  43. BsStaticProfit: "静态奖励",
  44. BsDirectProfit: "直推奖励",
  45. BsInviteProfit: "间推奖励",
  46. BsEqualProfit: "平级奖励",
  47. BsTeamProfit: "团队奖励",
  48. BsDaoPurchase: "DAO产品购买",
  49. BsDaoProfit: "DAO收益",
  50. BsFundOrganizationProfit: "基金会收益",
  51. BsLeaderProfit: "DAO团队长收益",
  52. BsAgentProfit: "DAO代理收益",
  53. BsPartnerProfit: "DAO合伙人收益",
  54. BsFmcProducer: "FMC产矿",
  55. }
  56. // 资金相关
  57. const (
  58. UnknownNumber int = iota + 100
  59. BsDeposit // 充值
  60. BsWithdraw // 提现
  61. BsDistribution // 分发
  62. BsSysDeduction // 系统划扣
  63. )
  64. // 参团
  65. const (
  66. UnknownJoinGroupNumber int = iota + 200
  67. BsJoinGroup // 参团
  68. BsCancelGroup // 撤团
  69. BsGroupReturnCost // 退回本金
  70. )
  71. // 参团
  72. const (
  73. _ int = iota + 300
  74. BsStaticProfit // 静态奖励
  75. BsDirectProfit // 直推奖励
  76. BsInviteProfit // 间推奖励
  77. BsEqualProfit // 平级奖励
  78. BsTeamProfit // 团队奖励
  79. BsDaoPurchase // DAO产品购买
  80. BsDaoProfit // DAO收益
  81. BsFmcProducer // FMC收益
  82. BsFundOrganizationProfit // 基金会收益
  83. BsLeaderProfit
  84. BsAgentProfit
  85. BsPartnerProfit
  86. )
  87. var ProfitRecordBsMap = map[int]string{
  88. BsDirectProfit: "直推奖励",
  89. BsInviteProfit: "间推奖励",
  90. BsEqualProfit: "平级奖励",
  91. BsTeamProfit: "团队奖励",
  92. }