LumilotoUtils.cs 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using SuperAdmin.Controllers;
  6. using SuperAdmin.Models.Http;
  7. namespace SuperAdmin.Source
  8. {
  9. public class LumilotoUtils
  10. {
  11. private static readonly log4net.ILog log = log4net.LogManager.GetLogger(typeof(Program));
  12. public class GameIds
  13. {
  14. public const string LUCKY_POWER = "1";
  15. public const string LUCKY_DAY = "2";
  16. public const string LUCKY_PLUS = "3";
  17. }
  18. public class ResultOrder
  19. {
  20. public static String asc = "asc";
  21. public static String desc = "desc";
  22. }
  23. //1: lấy các term đang cho phép mia ticket
  24. //2: lấy các term đã khóa, không cho mua ticket, đang đợi quay thưởng hoặc nhập giải thưởng(LuckyPower)
  25. //3: đã chấp nhận kết quả
  26. //4: kế quả bị từ chối, đợi nhập lại
  27. //5:. đã nhập kết quả và đợi phê duyệt kết quả
  28. public class GetTermStatus
  29. {
  30. public const string available = "1";
  31. public const string waitResult = "2";
  32. public const string accepted = "3";
  33. public const string rejected = "4";
  34. public const string waitApproved = "5";
  35. }
  36. public class PaidStatus
  37. {
  38. public const string notYetPaid = "0";
  39. public const string alreadyPaid = "1";
  40. public const string paying = "2";
  41. public const string paidError = "3";
  42. }
  43. public class ExportActionType
  44. {
  45. //0=delete data,1=start upload data,2=finish upload data xong, doi duyet,3=reject,4= delete export;5=duyệt
  46. public const string deleteData = "0";
  47. public const string startUpload = "1";
  48. public const string finishUpload = "2";
  49. public const string rejected = "3";
  50. public const string deleted = "4";
  51. public const string approved = "5";
  52. }
  53. public class ExportStatus
  54. {
  55. //<option value = "0" > Draft </ option >
  56. // < option value="1">Uploading</option>
  57. // <option value = "2" > Finish upload</option>
  58. // <option value = "3" > Rejected </ option >
  59. // < option value="4">Deleted</option>
  60. // <option value = "5" > Approved </ option >
  61. public const string draft = "0";
  62. public const string startUpload = "1";
  63. public const string finishUpload = "2";
  64. public const string rejected = "3";
  65. public const string deleted = "4";
  66. public const string approved = "5";
  67. public const string addingMoney = "6";
  68. public const string finishAddMoney = "7";
  69. }
  70. public class LuckyPowerResultStatus
  71. {
  72. public const string waitApprove = "0";
  73. public const string rejected = "1";
  74. public const string approved = "2";
  75. }
  76. public class ExportType
  77. {
  78. //1=Lấy danh sách người trúng thưởng từ hệ thống ,
  79. //2=lấy danh sách từ file upload
  80. //3=lấy danh sách người trúng thưởng có trong hệ thống mà ko có trong file import
  81. //4=lấy danh sách có trong file import mà ko có trong hệ thống
  82. public static string fromSystem = "1";
  83. public static string fromUploadFile = "2";
  84. public static string sysWithoutImport = "3";
  85. public static string importWithoutSys = "4";
  86. }
  87. public class RequestCommand
  88. {
  89. public static String CustomerSync = "CustomerSync";
  90. public static String bet = "bet";
  91. public static String getTernList = "getTernList";
  92. public static String checkPin = "checkPin";
  93. public static String sendOtp = "sendOtp";
  94. public static String confirmCus = "confirmCus";
  95. public static String confirmOtp = "confirmOtp";
  96. public static String getParam = "getParam";
  97. }
  98. public class WsType
  99. {
  100. public const String ExportGetList = "wsExportGetList";
  101. public const String ExportInsertData = "wsExportInsertData";
  102. public const String GetTermList = "wsGetTermList";
  103. public const String LkpwResultUpdate = "wsLkpwResultUpdate";
  104. public const String LkpwResultGetHis = "wsLkpwResultGetHis";
  105. public const String ExportCreated = "wsExportCreated";
  106. public const String ExportAction = "wsExportAction";
  107. public const String ExportWinnerGetData = "wsExportWinnerGetData";
  108. public const String ExportWinnerGetDataById = "wsExportWinnerGetDataById";
  109. public const String ExportGetHis = "wsExportGetHis";
  110. public const String BlackInsertData = "wsBlackInsertData";
  111. public const String BackListGetList = "wsBackListGetList";
  112. public const String TrafficDayGet = "wsTrafficDayGet";
  113. public const String MsisdnSearch = "wsMsisdnSearch";
  114. public const String LockUser = "wsLockUser";
  115. public const String GetTicketInfo = "wsGetTicketInfo";
  116. public const String GetTrafficTotal = "wsGetTrafficTotal";
  117. public const String GetTopPlayer = "wsGetTopPlayer";
  118. public const String Executes = "wsExecutes";
  119. public const String TermResult = "urlTermresult";
  120. public const String ReportByTerm = "urlReportByTerm";
  121. public const String RevenueTotal = "urlRevenueTotal";
  122. public const String RevenueDetail = "urlRevenueDetail";
  123. public const String RewardTotal = "urlRewardTotal";
  124. public const String RewardDetail = "urlRewardDetail";
  125. }
  126. public static String GetGameName(string gameId)
  127. {
  128. switch (gameId)
  129. {
  130. case GameIds.LUCKY_DAY:
  131. return "Lucky Day";
  132. case GameIds.LUCKY_POWER:
  133. return "Lucky Power";
  134. case GameIds.LUCKY_PLUS:
  135. return "Lucky Plus";
  136. case "-1":
  137. return "All games";
  138. }
  139. return "";
  140. }
  141. public static String GetStatusExportName(string status)
  142. {
  143. switch (status)
  144. {
  145. case ExportActionType.deleteData:
  146. return "Not upload";
  147. case ExportActionType.startUpload:
  148. return "Uploading";
  149. case ExportActionType.finishUpload:
  150. return "Wait approving";
  151. case ExportActionType.rejected:
  152. return "Rejected";
  153. case ExportActionType.deleted:
  154. return "Deleted";
  155. case ExportActionType.approved:
  156. return "Approved";
  157. }
  158. return "";
  159. }
  160. public static String GetStatusPaid(string status)
  161. {
  162. switch (status)
  163. {
  164. case PaidStatus.notYetPaid:
  165. return "Not yet paid";
  166. case PaidStatus.alreadyPaid:
  167. return "Already paid";
  168. case PaidStatus.paying:
  169. return "Paying";
  170. case PaidStatus.paidError:
  171. return "PaidError";
  172. }
  173. return "";
  174. }
  175. public static String GetGameId(string gameName)
  176. {
  177. gameName = gameName.ToUpper().Trim();
  178. switch (gameName)
  179. {
  180. case "LUCKY DAY":
  181. return GameIds.LUCKY_DAY;
  182. case "LUCKY POWER":
  183. return GameIds.LUCKY_POWER;
  184. case "LUCKY PLUS":
  185. return GameIds.LUCKY_PLUS;
  186. }
  187. return "";
  188. }
  189. }
  190. }