RelationClass.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using MySystem.MainModels;
  5. namespace MySystem
  6. {
  7. public class RelationClass
  8. {
  9. public static string GetUserLevelSetInfo(int key)
  10. {
  11. UserLevelSet item = UserLevelSetDbconn.Instance.GetList().FirstOrDefault(m => m.Id == key);
  12. if (item != null)
  13. {
  14. return item.Name;
  15. }
  16. return "K1";
  17. }
  18. public static string GetUsersInfo(int key)
  19. {
  20. Users item = UsersDbconn.Instance.Get(key) ?? new Users();
  21. return item.RealName;
  22. }
  23. public static string GetConsumersInfo(int key)
  24. {
  25. Consumers item = ConsumersDbconn.Instance.Get(key) ?? new Consumers();
  26. return item.NickName;
  27. }
  28. #region 获取产品名称
  29. public static string GetKqProductBrandInfo(int key)
  30. {
  31. WebCMSEntities db = new WebCMSEntities();
  32. KqProducts pro = db.KqProducts.FirstOrDefault(m => m.Id == key);
  33. db.Dispose();
  34. if (pro != null)
  35. {
  36. return pro.Name;
  37. }
  38. return "";
  39. }
  40. #endregion
  41. #region 收支明细变动类型
  42. public static string GetChangeTypeInfo(int key)
  43. {
  44. if (key == 0) return "激活奖励";
  45. if (key == 1) return "交易分润";
  46. if (key == 11) return "月月红";
  47. if (key == 12) return "交易奖励";
  48. if (key == 2) return "提现申请";
  49. if (key == 3) return "提现代付";
  50. if (key == 4) return "提现手续费";
  51. if (key == 5) return "提现税点扣除";
  52. if (key == 6) return "提现失败,解冻";
  53. if (key == 61) return "系统冻结";
  54. if (key == 62) return "系统解冻";
  55. if (key == 63) return "系统扣减";
  56. if (key == 64) return "系统奖励";
  57. if (key == 65) return "押金暂扣";
  58. if (key == 66) return "押金退还";
  59. if (key == 7) return "系统扣除";
  60. if (key == 10) return "办卡奖励";
  61. if (key == 20) return "余额支付";
  62. if (key == 21) return "余额退款";
  63. if (key == 22) return "余额退款手续费";
  64. if (key == 30) return "红包奖励";
  65. if (key == 31) return "活动奖励";
  66. if (key == 40) return "商户达标返";
  67. if (key == 50) return "开机奖励";
  68. if (key == 60) return "流量卡分佣";
  69. if (key == 111) return "分润补贴";
  70. if (key == 112) return "推荐奖励";
  71. if (key == 113) return "招商节奖励";
  72. if (key == 114) return "私董会分红";
  73. if (key == 115) return "分仓奖励";
  74. if (key == 116) return "大盟主奖励";
  75. if (key == 117) return "盟主奖励(储蓄金入账)";
  76. if (key == 118) return "盟主奖励(购机奖励)";
  77. if (key == 119) return "分仓临时额度退还";
  78. if (key == 120) return "运营中心(购机奖励)";
  79. if (key == 121) return "运营中心奖励";
  80. if (key == 122) return "推荐大盟主奖励";
  81. if (key == 123) return "推荐小盟主奖励";
  82. if (key == 124) return "扣机具货款";
  83. if (key == 125) return "软件服务费";
  84. if (key == 126) return "机具货款退还";
  85. return "";
  86. }
  87. #endregion
  88. #region 机具类型
  89. public static string GetPosSnTypeInfo(int key)
  90. {
  91. if (key == 0) return "兑换机";
  92. if (key == 1) return "循环机";
  93. return "";
  94. }
  95. #endregion
  96. #region 订单状态
  97. public static string GetOrderStatusInfo(int key)
  98. {
  99. if (key == 0) return "待付款";
  100. if (key == 1) return "待发货";
  101. if (key == 2) return "已完成";
  102. if (key == 3) return "已发货";
  103. return "";
  104. }
  105. #endregion
  106. #region 机具兑换申请状态
  107. public static string GetMachineApplyStatusInfo(int key)
  108. {
  109. if (key == 0) return "待审核";
  110. if (key == 1) return "申请成功";
  111. if (key == 2) return "申请失败";
  112. return "";
  113. }
  114. #endregion
  115. #region 组队申请状态
  116. public static string GetTeamOfferApplyStatusInfo(int key)
  117. {
  118. if (key == 0) return "待审核";
  119. if (key == 1) return "审核通过";
  120. if (key == 2) return "审核失败";
  121. if (key == 3) return "组队成功";
  122. if (key == 4) return "组队失败";
  123. return "";
  124. }
  125. #endregion
  126. #region 商户激活类型
  127. public static string GetMerchantActTypeInfo(int key)
  128. {
  129. if (key == 0) return "正常激活";
  130. if (key == 1) return "首次已激活MPOS";
  131. if (key == 2) return "首次已激活KPOS";
  132. if (key == 3) return "循环机划拨激活";
  133. return "";
  134. }
  135. #endregion
  136. }
  137. }