PosMerchantInfoListController.cs 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039
  1. /*
  2. * 商户
  3. */
  4. using System;
  5. using System.Web;
  6. using System.Collections.Generic;
  7. using System.Diagnostics;
  8. using System.Linq;
  9. using System.Data;
  10. using System.Threading.Tasks;
  11. using Microsoft.AspNetCore.Mvc;
  12. using Microsoft.AspNetCore.Http;
  13. using Microsoft.Extensions.Logging;
  14. using Microsoft.Extensions.Options;
  15. using MySystem.Models;
  16. using Library;
  17. using LitJson;
  18. using MySystemLib;
  19. namespace MySystem.Areas.Admin.Controllers
  20. {
  21. [Area("Admin")]
  22. [Route("Admin/[controller]/[action]")]
  23. public class PosMerchantInfoListController : BaseController
  24. {
  25. public PosMerchantInfoListController(IHttpContextAccessor accessor, ILogger<BaseController> logger, IOptions<Setting> setting) : base(accessor, logger, setting)
  26. {
  27. OtherMySqlConn.connstr = ConfigurationManager.AppSettings["SqlConnStr"].ToString();
  28. }
  29. #region 商户列表
  30. /// <summary>
  31. /// 根据条件查询商户列表
  32. /// </summary>
  33. /// <returns></returns>
  34. public IActionResult Index(PosMerchantInfo data, string right, string BrandId)
  35. {
  36. ViewBag.RightInfo = RightInfo;
  37. ViewBag.right = right;
  38. ViewBag.BrandId = BrandId;
  39. return View();
  40. }
  41. #endregion
  42. #region 根据条件查询商户列表
  43. /// <summary>
  44. /// 商户列表
  45. /// </summary>
  46. /// <returns></returns>
  47. public JsonResult IndexData(PosMerchantInfo data, string MerIdcardNo, string MerchantName, string PhoneNo, string PosSn, int ShowFlag = 0, int page = 1, int limit = 30)
  48. {
  49. Dictionary<string, string> Fields = new Dictionary<string, string>();
  50. if (ShowFlag == 0)
  51. {
  52. Dictionary<string, object> objs = new Dictionary<string, object>();
  53. return Json(objs);
  54. }
  55. string condition = " and Status>-1";
  56. //身份证号
  57. if (!string.IsNullOrEmpty(MerIdcardNo))
  58. {
  59. var IdCardf = MerIdcardNo.Substring(0, 6);
  60. var IdCardb = MerIdcardNo.Substring(MerIdcardNo.Length - 4);
  61. condition += " and LEFT(MerIdcardNo,6)=" + IdCardf + " AND RIGHT(MerIdcardNo,4)=" + IdCardb + "";
  62. }
  63. //商户姓名
  64. if (!string.IsNullOrEmpty(MerchantName))
  65. {
  66. condition += " and MerchantName like '%" + MerchantName + "%'";
  67. }
  68. //手机号
  69. if (!string.IsNullOrEmpty(PhoneNo))
  70. {
  71. var PhoneNof = PhoneNo.Substring(0, 3);
  72. var PhoneNob = PhoneNo.Substring(PhoneNo.Length - 4);
  73. condition += " and LEFT(MerchantMobile,3)=" + PhoneNof + " AND RIGHT(MerchantMobile,4)=" + PhoneNob + "";
  74. }
  75. //机具号
  76. if (!string.IsNullOrEmpty(PosSn))
  77. {
  78. condition += " and KqSnNo='" + PosSn + "'";
  79. }
  80. Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("PosMerchantInfo", Fields, "Id desc", "0", page, limit, condition);
  81. List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
  82. foreach (Dictionary<string, object> dic in diclist)
  83. {
  84. //直属创客
  85. int UserId = int.Parse(dic["UserId"].ToString());
  86. Users puser = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
  87. dic["MakerCode"] = puser.MakerCode;
  88. dic["RealName"] = puser.RealName;
  89. //顶级创客
  90. int TopUserId = int.Parse(dic["TopUserId"].ToString());
  91. Users tuser = db.Users.FirstOrDefault(m => m.Id == TopUserId) ?? new Users();
  92. dic["TopMakerCode"] = tuser.MakerCode;
  93. dic["TopRealName"] = tuser.RealName;
  94. //商户创客
  95. int MerUserId = int.Parse(dic["MerUserId"].ToString());
  96. Users muser = db.Users.FirstOrDefault(m => m.Id == MerUserId) ?? new Users();
  97. dic["MerMakerCode"] = muser.MakerCode;
  98. dic["MerRealName"] = muser.RealName;
  99. //申请创客
  100. int SnApplyUserId = int.Parse(dic["SnApplyUserId"].ToString());
  101. Users snuser = db.Users.FirstOrDefault(m => m.Id == SnApplyUserId) ?? new Users();
  102. dic["SnApplyMakerCode"] = snuser.MakerCode;
  103. dic["SnApplyRealName"] = snuser.RealName;
  104. //SN仓库
  105. int SnStoreId = int.Parse(dic["SnStoreId"].ToString());
  106. StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.Id == SnStoreId) ?? new StoreHouse();
  107. dic["StoreNo"] = store.StoreNo;
  108. dic["StoreName"] = store.StoreName;
  109. //机具类型
  110. int SnType = int.Parse(dic["SnType"].ToString());
  111. if (SnType == 0) dic["SnType"] = "兑换机具";
  112. if (SnType == 1) dic["SnType"] = "循环机具";
  113. //返利资格
  114. dic["RebateQual"] = dic["RebateQual"].ToString() == "1" ? "是" : "否";
  115. //激活类型
  116. int ActType = int.Parse(dic["ActType"].ToString());
  117. if (ActType == 0) dic["ActType"] = "正常激活";
  118. if (ActType == 1) dic["ActType"] = "首次已激活MPOS";
  119. if (ActType == 2) dic["ActType"] = "首次已激活KPOS";
  120. if (ActType == 3) dic["ActType"] = "循环机划拨激活";
  121. //商户状态
  122. int MerStatus = int.Parse(dic["MerStatus"].ToString());
  123. if (MerStatus == 0) dic["MerStatus"] = "正常";
  124. if (MerStatus == 1) dic["MerStatus"] = "冻结";
  125. if (MerStatus == 2) dic["MerStatus"] = "关闭";
  126. //商户激活状态
  127. int ActiveStatus = int.Parse(dic["ActiveStatus"].ToString());
  128. if (ActiveStatus == 0) dic["ActiveStatus"] = "未激活";
  129. if (ActiveStatus == 1) dic["ActiveStatus"] = "已激活";
  130. if (ActiveStatus == 2) dic["ActiveStatus"] = "SN已返现";
  131. //商户创客类型
  132. int MerUserType = int.Parse(dic["MerUserType"].ToString());
  133. if (MerUserType == 0) dic["MerUserType"] = "非商户型创客";
  134. if (MerUserType == 1) dic["MerUserType"] = "商户型创客";
  135. }
  136. return Json(obj);
  137. }
  138. #endregion
  139. #region 人工已退商户列表
  140. /// <summary>
  141. /// 根据条件人工已退商户列表
  142. /// </summary>
  143. /// <returns></returns>
  144. public IActionResult Indexrg(PosMerchantInfo data, string right, string BrandId)
  145. {
  146. ViewBag.RightInfo = RightInfo;
  147. ViewBag.right = right;
  148. ViewBag.BrandId = BrandId;
  149. return View();
  150. }
  151. #endregion
  152. #region 根据条件查询人工已退商户列表
  153. /// <summary>
  154. /// 人工已退商户列表
  155. /// </summary>
  156. /// <returns></returns>
  157. public JsonResult IndexrgData(PosMerchantInfo data, string MerIdcardNo, string MerchantName, string PhoneNo, string PosSn, int page = 1, int limit = 30)
  158. {
  159. Dictionary<string, string> Fields = new Dictionary<string, string>();
  160. Fields.Add("KqMerNo", "1"); //商户编号
  161. string condition = " and Status>-1 and StandardStatus=-2";
  162. //身份证号
  163. if (!string.IsNullOrEmpty(MerIdcardNo))
  164. {
  165. var IdCardf = MerIdcardNo.Substring(0, 6);
  166. var IdCardb = MerIdcardNo.Substring(MerIdcardNo.Length - 4);
  167. condition += " and LEFT(MerIdcardNo,6)=" + IdCardf + " AND RIGHT(MerIdcardNo,4)=" + IdCardb + "";
  168. }
  169. //商户姓名
  170. if (!string.IsNullOrEmpty(MerchantName))
  171. {
  172. condition += " and MerchantName like '%" + MerchantName + "%'";
  173. }
  174. //手机号
  175. if (!string.IsNullOrEmpty(PhoneNo))
  176. {
  177. var PhoneNof = PhoneNo.Substring(0, 3);
  178. var PhoneNob = PhoneNo.Substring(PhoneNo.Length - 4);
  179. condition += " and LEFT(MerchantMobile,3)=" + PhoneNof + " AND RIGHT(MerchantMobile,4)=" + PhoneNob + "";
  180. }
  181. //机具号
  182. if (!string.IsNullOrEmpty(PosSn))
  183. {
  184. condition += " and KqSnNo='" + PosSn + "'";
  185. }
  186. Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("PosMerchantInfo", Fields, "Id desc", "0", page, limit, condition);
  187. List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
  188. foreach (Dictionary<string, object> dic in diclist)
  189. {
  190. //直属创客
  191. int UserId = int.Parse(dic["UserId"].ToString());
  192. Users puser = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
  193. dic["MakerCode"] = puser.MakerCode;
  194. dic["RealName"] = puser.RealName;
  195. //顶级创客
  196. int TopUserId = int.Parse(dic["TopUserId"].ToString());
  197. Users tuser = db.Users.FirstOrDefault(m => m.Id == TopUserId) ?? new Users();
  198. dic["TopMakerCode"] = tuser.MakerCode;
  199. dic["TopRealName"] = tuser.RealName;
  200. //商户创客
  201. int MerUserId = int.Parse(dic["MerUserId"].ToString());
  202. Users muser = db.Users.FirstOrDefault(m => m.Id == MerUserId) ?? new Users();
  203. dic["MerMakerCode"] = muser.MakerCode;
  204. dic["MerRealName"] = muser.RealName;
  205. //申请创客
  206. int SnApplyUserId = int.Parse(dic["SnApplyUserId"].ToString());
  207. Users snuser = db.Users.FirstOrDefault(m => m.Id == SnApplyUserId) ?? new Users();
  208. dic["SnApplyMakerCode"] = snuser.MakerCode;
  209. dic["SnApplyRealName"] = snuser.RealName;
  210. //SN仓库
  211. int SnStoreId = int.Parse(dic["SnStoreId"].ToString());
  212. StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.Id == SnStoreId) ?? new StoreHouse();
  213. dic["StoreNo"] = store.StoreNo;
  214. dic["StoreName"] = store.StoreName;
  215. //机具类型
  216. int SnType = int.Parse(dic["SnType"].ToString());
  217. if (SnType == 0) dic["SnType"] = "兑换机具";
  218. if (SnType == 1) dic["SnType"] = "循环机具";
  219. //返利资格
  220. dic["RebateQual"] = dic["RebateQual"].ToString() == "1" ? "是" : "否";
  221. //激活类型
  222. int ActType = int.Parse(dic["ActType"].ToString());
  223. if (ActType == 0) dic["ActType"] = "正常激活";
  224. if (ActType == 1) dic["ActType"] = "首次已激活MPOS";
  225. if (ActType == 2) dic["ActType"] = "首次已激活KPOS";
  226. if (ActType == 3) dic["ActType"] = "循环机划拨激活";
  227. //商户状态
  228. int MerStatus = int.Parse(dic["MerStatus"].ToString());
  229. if (MerStatus == 0) dic["MerStatus"] = "正常";
  230. if (MerStatus == 1) dic["MerStatus"] = "冻结";
  231. if (MerStatus == 2) dic["MerStatus"] = "关闭";
  232. //商户激活状态
  233. int ActiveStatus = int.Parse(dic["ActiveStatus"].ToString());
  234. if (ActiveStatus == 0) dic["ActiveStatus"] = "未激活";
  235. if (ActiveStatus == 1) dic["ActiveStatus"] = "已激活";
  236. if (ActiveStatus == 2) dic["ActiveStatus"] = "SN已返现";
  237. //商户创客类型
  238. int MerUserType = int.Parse(dic["MerUserType"].ToString());
  239. if (MerUserType == 0) dic["MerUserType"] = "非商户型创客";
  240. if (MerUserType == 1) dic["MerUserType"] = "商户型创客";
  241. var KqSnNo = dic["KqSnNo"].ToString();
  242. var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == KqSnNo) ?? new PosMachinesTwo();
  243. //实际押金
  244. string SeoKeyword = "0";
  245. if (!string.IsNullOrEmpty(pos.SeoKeyword))
  246. {
  247. if (pos.BrandId != 2 && pos.BrandId != 7 && pos.BrandId != 10 && pos.BrandId != 11)
  248. {
  249. SeoKeyword = (decimal.Parse(pos.SeoKeyword) / 100).ToString();
  250. }
  251. else
  252. {
  253. SeoKeyword = pos.SeoKeyword;
  254. }
  255. }
  256. dic["SeoKeyword"] = SeoKeyword;
  257. //设置押金
  258. string PrizeParams = "0";
  259. if (!string.IsNullOrEmpty(pos.PrizeParams))
  260. {
  261. PrizeParams = pos.PrizeParams.ToString();
  262. }
  263. dic["PrizeParams"] = PrizeParams;
  264. }
  265. Dictionary<string, object> other = new Dictionary<string, object>();
  266. decimal ReturnAmount = 0.00M;//服务费总金额
  267. decimal ReturnAmounts = 0.00M;//退还总金额
  268. DataTable dt = OtherMySqlConn.dtable("SELECT SUM(Remark) FROM PosMerchantInfo WHERE 1=1" + condition);
  269. if (dt.Rows.Count > 0)
  270. {
  271. ReturnAmounts = decimal.Parse(function.CheckNum(dt.Rows[0][0].ToString()));
  272. }
  273. DataTable dts = OtherMySqlConn.dtable("SELECT KqSnNo FROM PosMerchantInfo WHERE 1=1" + condition);
  274. if (dt.Rows.Count > 0)
  275. {
  276. foreach (DataRow item in dts.Rows)
  277. {
  278. string KqSnNo = item["KqSnNo"].ToString();
  279. var pos = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == KqSnNo) ?? new PosMachinesTwo();
  280. if (!string.IsNullOrEmpty(pos.SeoKeyword))
  281. {
  282. if (pos.BrandId != 2 && pos.BrandId != 7)
  283. {
  284. ReturnAmount += decimal.Parse(pos.SeoKeyword) / 100;
  285. }
  286. else
  287. {
  288. ReturnAmount += decimal.Parse(pos.SeoKeyword);
  289. }
  290. }
  291. }
  292. }
  293. other.Add("ReturnAmount", ReturnAmount.ToString("f2"));
  294. other.Add("ReturnAmounts", ReturnAmounts.ToString("f2"));
  295. obj.Add("other", other);
  296. return Json(obj);
  297. }
  298. #endregion
  299. #region 达标商户列表
  300. /// <summary>
  301. /// 达标商户列表
  302. /// </summary>
  303. /// <returns></returns>
  304. public IActionResult Indexs(PosMerchantInfo data, string right, string BrandId)
  305. {
  306. ViewBag.RightInfo = RightInfo;
  307. ViewBag.right = right;
  308. ViewBag.BrandId = BrandId;
  309. return View();
  310. }
  311. #endregion
  312. #region 根据条件查询达标商户列表
  313. /// <summary>
  314. /// 根据条件查询达标商户列表
  315. /// </summary>
  316. /// <returns></returns>
  317. public JsonResult IndexsData(PosMerchantInfo data, int page = 1, int limit = 30)
  318. {
  319. Dictionary<string, string> Fields = new Dictionary<string, string>();
  320. Fields.Add("MerchantMobile", "1"); //商户手机号
  321. Fields.Add("KqSnNo", "1"); //快钱SN号
  322. Fields.Add("MerIdcardNo", "1"); //身份证号
  323. string condition = " and Status>-1 and StandardStatus=4 and StandardMonths=10";
  324. Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("PosMerchantInfo", Fields, "Id desc", "0", page, limit, condition);
  325. List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
  326. foreach (Dictionary<string, object> dic in diclist)
  327. {
  328. //直属创客
  329. int UserId = int.Parse(dic["UserId"].ToString());
  330. Users puser = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
  331. dic["MakerCode"] = puser.MakerCode;
  332. dic["RealName"] = puser.RealName;
  333. //顶级创客
  334. int TopUserId = int.Parse(dic["TopUserId"].ToString());
  335. Users tuser = db.Users.FirstOrDefault(m => m.Id == TopUserId) ?? new Users();
  336. dic["TopMakerCode"] = tuser.MakerCode;
  337. dic["TopRealName"] = tuser.RealName;
  338. //商户创客
  339. int MerUserId = int.Parse(dic["MerUserId"].ToString());
  340. Users muser = db.Users.FirstOrDefault(m => m.Id == MerUserId) ?? new Users();
  341. dic["MerMakerCode"] = muser.MakerCode;
  342. dic["MerRealName"] = muser.RealName;
  343. //申请创客
  344. int SnApplyUserId = int.Parse(dic["SnApplyUserId"].ToString());
  345. Users snuser = db.Users.FirstOrDefault(m => m.Id == SnApplyUserId) ?? new Users();
  346. dic["SnApplyMakerCode"] = snuser.MakerCode;
  347. dic["SnApplyRealName"] = snuser.RealName;
  348. //SN仓库
  349. int SnStoreId = int.Parse(dic["SnStoreId"].ToString());
  350. StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.Id == SnStoreId) ?? new StoreHouse();
  351. dic["StoreNo"] = store.StoreNo;
  352. dic["StoreName"] = store.StoreName;
  353. //机具类型
  354. int SnType = int.Parse(dic["SnType"].ToString());
  355. if (SnType == 0) dic["SnType"] = "兑换机具";
  356. if (SnType == 1) dic["SnType"] = "循环机具";
  357. //返利资格
  358. dic["RebateQual"] = dic["RebateQual"].ToString() == "1" ? "是" : "否";
  359. //激活类型
  360. int ActType = int.Parse(dic["ActType"].ToString());
  361. if (ActType == 0) dic["ActType"] = "正常激活";
  362. if (ActType == 1) dic["ActType"] = "首次已激活MPOS";
  363. if (ActType == 2) dic["ActType"] = "首次已激活KPOS";
  364. if (ActType == 3) dic["ActType"] = "循环机划拨激活";
  365. //商户状态
  366. int MerStatus = int.Parse(dic["MerStatus"].ToString());
  367. if (MerStatus == 0) dic["MerStatus"] = "正常";
  368. if (MerStatus == 1) dic["MerStatus"] = "冻结";
  369. if (MerStatus == 2) dic["MerStatus"] = "关闭";
  370. //商户激活状态
  371. int ActiveStatus = int.Parse(dic["ActiveStatus"].ToString());
  372. if (ActiveStatus == 0) dic["ActiveStatus"] = "未激活";
  373. if (ActiveStatus == 1) dic["ActiveStatus"] = "已激活";
  374. if (ActiveStatus == 2) dic["ActiveStatus"] = "SN已返现";
  375. //商户创客类型
  376. int MerUserType = int.Parse(dic["MerUserType"].ToString());
  377. if (MerUserType == 0) dic["MerUserType"] = "非商户型创客";
  378. if (MerUserType == 1) dic["MerUserType"] = "商户型创客";
  379. }
  380. return Json(obj);
  381. }
  382. #endregion
  383. #region 首台达标商户列表
  384. /// <summary>
  385. /// 首台达标商户列表
  386. /// </summary>
  387. /// <returns></returns>
  388. public IActionResult Indexfs(string right)
  389. {
  390. ViewBag.RightInfo = RightInfo;
  391. ViewBag.right = right;
  392. return View();
  393. }
  394. #endregion
  395. #region 根据条件查询首台达标商户列表
  396. /// <summary>
  397. /// 根据条件查询首台达标商户列表
  398. /// </summary>
  399. /// <returns></returns>
  400. public IActionResult IndexfsData(string MerchantMobile, string KqSnNo, string MerIdcardNo, int page = 1, int limit = 30)
  401. {
  402. string condition = "";
  403. if (!string.IsNullOrEmpty(MerchantMobile))
  404. {
  405. condition += " and b.MerchantMobile like '%" + MerchantMobile + "%'";
  406. }
  407. if (!string.IsNullOrEmpty(KqSnNo))
  408. {
  409. condition += " and b.KqSnNo like '%" + KqSnNo + "%'";
  410. }
  411. if (!string.IsNullOrEmpty(MerIdcardNo))
  412. {
  413. condition += " and b.MerIdcardNo like '%" + MerIdcardNo + "%'";
  414. }
  415. var amount = 0.00M;
  416. List<Dictionary<string, object>> diclist = new List<Dictionary<string, object>>();
  417. DataTable dt = OtherMySqlConn.dtable("SELECT a.BrandId,a.PosSn,a.BindMerchantId,a.SeoKeyword,b.KqMerNo,b.MerIdcardNo,b.MerchantName,b.MerchantMobile FROM PosMachinesTwo a,PosMerchantInfo b WHERE a.`Status`>-1 AND a.SeoKeyword!='' AND a.SeoKeyword!='0' AND a.SeoKeyword IS NOT NULL AND a.IsFirst=1 AND b.StandardMonths=10 AND b.StandardStatus=4 AND a.BindMerchantId=b.Id " + condition);
  418. if (dt.Rows.Count > 0)
  419. {
  420. foreach (DataRow item in dt.Rows)
  421. {
  422. var BindMerchantId = item["BindMerchantId"].ToString();
  423. var BrandId = item["BrandId"].ToString();
  424. var PosSn = item["PosSn"].ToString();
  425. var SeoKeyword = item["SeoKeyword"].ToString();
  426. if (BrandId != "2" && BrandId != "7")
  427. {
  428. SeoKeyword = (decimal.Parse(SeoKeyword) / 100).ToString();
  429. }
  430. amount += decimal.Parse(SeoKeyword);
  431. var KqMerNo = item["KqMerNo"].ToString();
  432. var IdcardNo = item["MerIdcardNo"].ToString();
  433. var MerchantName = item["MerchantName"].ToString();
  434. var Mobile = item["MerchantMobile"].ToString();
  435. Dictionary<string, object> datas = new Dictionary<string, object>();
  436. datas.Add("Id", BindMerchantId);
  437. datas.Add("PosSn", PosSn);
  438. datas.Add("SeoKeyword", SeoKeyword);
  439. datas.Add("KqMerNo", KqMerNo);
  440. datas.Add("IdcardNo", IdcardNo);
  441. datas.Add("MerchantName", MerchantName);
  442. datas.Add("MerchantMobile", Mobile);
  443. diclist.Add(datas);
  444. }
  445. }
  446. Dictionary<string, object> obj = new Dictionary<string, object>();
  447. Dictionary<string, object> other = new Dictionary<string, object>();
  448. var ReturnAmount = amount;
  449. var fReturnAmount = amount * 0.92M;
  450. other.Add("ReturnAmount", ReturnAmount.ToString("f2"));
  451. other.Add("fReturnAmount", fReturnAmount.ToString("f2"));
  452. obj.Add("other", other);
  453. obj.Add("code", 0);
  454. obj.Add("msg", "");
  455. obj.Add("count", diclist.Count);
  456. obj.Add("data", diclist);
  457. return Json(obj);
  458. }
  459. #endregion
  460. #region 非首台达标商户列表
  461. /// <summary>
  462. /// 非首台达标商户列表
  463. /// </summary>
  464. /// <returns></returns>
  465. public IActionResult Indexnfs(string right)
  466. {
  467. ViewBag.RightInfo = RightInfo;
  468. ViewBag.right = right;
  469. return View();
  470. }
  471. #endregion
  472. #region 根据条件查询非首台达标商户列表
  473. /// <summary>
  474. /// 根据条件查询非首台达标商户列表
  475. /// </summary>
  476. /// <returns></returns>
  477. public IActionResult IndexnfsData(string MerchantMobile, string KqSnNo, string MerIdcardNo, int page = 1, int limit = 30)
  478. {
  479. string condition = "";
  480. if (!string.IsNullOrEmpty(MerchantMobile))
  481. {
  482. condition += " and b.MerchantMobile like '%" + MerchantMobile + "%'";
  483. }
  484. if (!string.IsNullOrEmpty(KqSnNo))
  485. {
  486. condition += " and b.KqSnNo like '%" + KqSnNo + "%'";
  487. }
  488. if (!string.IsNullOrEmpty(MerIdcardNo))
  489. {
  490. condition += " and b.MerIdcardNo like '%" + MerIdcardNo + "%'";
  491. }
  492. var amount = 0.00M;
  493. List<Dictionary<string, object>> diclist = new List<Dictionary<string, object>>();
  494. DataTable dt = OtherMySqlConn.dtable("SELECT a.BrandId,a.PosSn,a.BindMerchantId,a.SeoKeyword,b.KqMerNo,b.MerIdcardNo,b.MerchantName,b.MerchantMobile FROM PosMachinesTwo a,PosMerchantInfo b WHERE a.`Status`>-1 AND a.SeoKeyword!='' AND a.SeoKeyword!='0' AND a.SeoKeyword IS NOT NULL AND a.IsFirst=0 AND b.StandardMonths=10 AND b.StandardStatus=4 AND a.BindMerchantId=b.Id " + condition);
  495. if (dt.Rows.Count > 0)
  496. {
  497. foreach (DataRow item in dt.Rows)
  498. {
  499. var BindMerchantId = item["BindMerchantId"].ToString();
  500. var BrandId = item["BrandId"].ToString();
  501. var PosSn = item["PosSn"].ToString();
  502. var SeoKeyword = item["SeoKeyword"].ToString();
  503. if (BrandId != "2" && BrandId != "7")
  504. {
  505. SeoKeyword = (decimal.Parse(SeoKeyword) / 100).ToString();
  506. }
  507. amount += decimal.Parse(SeoKeyword);
  508. var KqMerNo = item["KqMerNo"].ToString();
  509. var IdcardNo = item["MerIdcardNo"].ToString();
  510. var MerchantName = item["MerchantName"].ToString();
  511. var Mobile = item["MerchantMobile"].ToString();
  512. Dictionary<string, object> datas = new Dictionary<string, object>();
  513. datas.Add("Id", BindMerchantId);
  514. datas.Add("PosSn", PosSn);
  515. datas.Add("SeoKeyword", SeoKeyword);
  516. datas.Add("KqMerNo", KqMerNo);
  517. datas.Add("IdcardNo", IdcardNo);
  518. datas.Add("MerchantName", MerchantName);
  519. datas.Add("MerchantMobile", Mobile);
  520. diclist.Add(datas);
  521. }
  522. }
  523. Dictionary<string, object> obj = new Dictionary<string, object>();
  524. Dictionary<string, object> other = new Dictionary<string, object>();
  525. var ReturnAmount = amount;
  526. var fReturnAmount = amount * 0.92M;
  527. other.Add("ReturnAmount", ReturnAmount.ToString("f2"));
  528. other.Add("fReturnAmount", fReturnAmount.ToString("f2"));
  529. obj.Add("other", other);
  530. obj.Add("code", 0);
  531. obj.Add("msg", "");
  532. obj.Add("count", diclist.Count);
  533. obj.Add("data", diclist);
  534. return Json(obj);
  535. }
  536. #endregion
  537. #region 批量通过
  538. /// <summary>
  539. /// 批量通过
  540. /// </summary>
  541. /// <returns></returns>
  542. public string BatchSetting(string Id)
  543. {
  544. string[] idlist = Id.Split(new char[] { ',' });
  545. AddSysLog(Id, "PosMerchantInfo", "BatchSetting");
  546. var Ids = "";//商户Id
  547. foreach (string subid in idlist)
  548. {
  549. int id = int.Parse(subid);
  550. Ids += id + ",";
  551. Dictionary<string, object> Fields = new Dictionary<string, object>();
  552. Fields.Add("StandardStatus", 101);//设置为可退押状态
  553. new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("PosMerchantInfo", Fields, id);
  554. }
  555. string text = string.Format("商户押金退还批量通过,商户Id: '" + Ids.TrimEnd(',') + "',操作人: '" + SysUserName + "_" + SysRealName + "',Time'" + DateTime.Now + "'");
  556. function.WriteLog(text, "商户押金退还批量通过");
  557. db.SaveChanges();
  558. return "success";
  559. }
  560. #endregion
  561. #region 增加商户
  562. /// <summary>
  563. /// 增加或修改商户信息
  564. /// </summary>
  565. /// <returns></returns>
  566. public IActionResult Add(string right)
  567. {
  568. ViewBag.RightInfo = RightInfo;
  569. ViewBag.right = right;
  570. return View();
  571. }
  572. #endregion
  573. #region 增加商户
  574. /// <summary>
  575. /// 增加或修改商户信息
  576. /// </summary>
  577. /// <returns></returns>
  578. [HttpPost]
  579. public string Add(PosMerchantInfo data)
  580. {
  581. Dictionary<string, object> Fields = new Dictionary<string, object>();
  582. Fields.Add("SeoTitle", data.SeoTitle);
  583. Fields.Add("SeoKeyword", data.SeoKeyword);
  584. Fields.Add("SeoDescription", data.SeoDescription);
  585. int Id = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Add("PosMerchantInfo", Fields, 0);
  586. AddSysLog(data.Id.ToString(), "PosMerchantInfo", "add");
  587. db.SaveChanges();
  588. return "success";
  589. }
  590. #endregion
  591. #region 修改商户
  592. /// <summary>
  593. /// 增加或修改商户信息
  594. /// </summary>
  595. /// <returns></returns>
  596. public IActionResult Edit(string right, int Id = 0)
  597. {
  598. ViewBag.RightInfo = RightInfo;
  599. ViewBag.right = right;
  600. PosMerchantInfo editData = db.PosMerchantInfo.FirstOrDefault(m => m.Id == Id) ?? new PosMerchantInfo();
  601. ViewBag.data = editData;
  602. return View();
  603. }
  604. #endregion
  605. #region 修改商户
  606. /// <summary>
  607. /// 增加或修改商户信息
  608. /// </summary>
  609. /// <returns></returns>
  610. [HttpPost]
  611. public string Edit(PosMerchantInfo data)
  612. {
  613. Dictionary<string, object> Fields = new Dictionary<string, object>();
  614. Fields.Add("SeoTitle", data.SeoTitle);
  615. Fields.Add("SeoKeyword", data.SeoKeyword);
  616. Fields.Add("SeoDescription", data.SeoDescription);
  617. new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("PosMerchantInfo", Fields, data.Id);
  618. AddSysLog(data.Id.ToString(), "PosMerchantInfo", "update");
  619. db.SaveChanges();
  620. return "success";
  621. }
  622. #endregion
  623. #region 删除商户信息
  624. /// <summary>
  625. /// 删除商户信息
  626. /// </summary>
  627. /// <returns></returns>
  628. public string Delete(string Id)
  629. {
  630. string[] idlist = Id.Split(new char[] { ',' });
  631. AddSysLog(Id, "PosMerchantInfo", "del");
  632. foreach (string subid in idlist)
  633. {
  634. int id = int.Parse(subid);
  635. Dictionary<string, object> Fields = new Dictionary<string, object>();
  636. Fields.Add("Status", -1);
  637. new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("PosMerchantInfo", Fields, id);
  638. }
  639. db.SaveChanges();
  640. return "success";
  641. }
  642. #endregion
  643. #region 开启
  644. /// <summary>
  645. /// 开启
  646. /// </summary>
  647. /// <returns></returns>
  648. public string Open(string Id)
  649. {
  650. string[] idlist = Id.Split(new char[] { ',' });
  651. AddSysLog(Id, "PosMerchantInfo", "open");
  652. foreach (string subid in idlist)
  653. {
  654. int id = int.Parse(subid);
  655. Dictionary<string, object> Fields = new Dictionary<string, object>();
  656. Fields.Add("Status", 1);
  657. new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("PosMerchantInfo", Fields, id);
  658. }
  659. db.SaveChanges();
  660. return "success";
  661. }
  662. #endregion
  663. #region 关闭
  664. /// <summary>
  665. /// 关闭
  666. /// </summary>
  667. /// <returns></returns>
  668. public string Close(string Id)
  669. {
  670. string[] idlist = Id.Split(new char[] { ',' });
  671. AddSysLog(Id, "PosMerchantInfo", "close");
  672. foreach (string subid in idlist)
  673. {
  674. int id = int.Parse(subid);
  675. Dictionary<string, object> Fields = new Dictionary<string, object>();
  676. Fields.Add("Status", 0);
  677. new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Edit("PosMerchantInfo", Fields, id);
  678. }
  679. db.SaveChanges();
  680. return "success";
  681. }
  682. #endregion
  683. #region 排序
  684. /// <summary>
  685. /// 排序
  686. /// </summary>
  687. /// <param name="Id"></param>
  688. public string Sort(int Id, int Sort)
  689. {
  690. new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).Sort("PosMerchantInfo", Sort, Id);
  691. AddSysLog(Id.ToString(), "PosMerchantInfo", "sort");
  692. return "success";
  693. }
  694. #endregion
  695. #region 导入数据
  696. /// <summary>
  697. /// 导入数据
  698. /// </summary>
  699. /// <param name="ExcelData"></param>
  700. public string Import(string ExcelData)
  701. {
  702. ExcelData = HttpUtility.UrlDecode(ExcelData);
  703. JsonData list = JsonMapper.ToObject(ExcelData);
  704. var Ids = "";
  705. for (int i = 1; i < list.Count; i++)
  706. {
  707. JsonData dr = list[i];
  708. string KqMerNo = dr[0].ToString(); // 商户编号
  709. string Amount = dr[1].ToString(); // 已退金额
  710. var posMerchantInfo = db.PosMerchantInfo.FirstOrDefault(m => m.KqMerNo == KqMerNo) ?? new PosMerchantInfo();
  711. posMerchantInfo.StandardStatus = -2;
  712. posMerchantInfo.Remark = Amount;
  713. Ids += posMerchantInfo.Id + "_" + Amount + ",";
  714. db.SaveChanges();
  715. }
  716. AddSysLog("0", "PosMerchantInfo", "Import");
  717. string text = string.Format("导入人工已退,商户Id: '" + Ids.TrimEnd(',') + "',操作人: '" + SysUserName + "_" + SysRealName + "',Time'" + DateTime.Now + "'");
  718. function.WriteLog(text, "导入人工已退");
  719. return "success";
  720. }
  721. #endregion
  722. #region 导出Excel
  723. /// <summary>
  724. /// 导出Excel
  725. /// </summary>
  726. /// <returns></returns>
  727. public JsonResult ExportExcel(PosMerchantInfo data, string MakerCode, string RealName, string MerMakerCode, string StoreNo, string StoreName, string MerStatusSelect, string ActiveStatusSelect, string ActTypeSelect, string MerUserTypeSelect)
  728. {
  729. Dictionary<string, string> Fields = new Dictionary<string, string>();
  730. Fields.Add("BrandId", "1");
  731. Fields.Add("MerchantNo", "1"); //商户编号
  732. Fields.Add("MerchantName", "1"); //商户姓名
  733. Fields.Add("MerchantMobile", "1"); //商户手机号
  734. Fields.Add("KqMerNo", "1"); //快钱商户编码
  735. Fields.Add("KqSnNo", "1"); //快钱SN号
  736. Fields.Add("KqRegTime", "3"); //渠道注册时间
  737. Fields.Add("TopUserId", "0"); //顶级创客
  738. string condition = " and Status>-1";
  739. //创客编号
  740. if (!string.IsNullOrEmpty(MakerCode))
  741. {
  742. condition += " and UserId in (select UserId from UserForMakerCode where MakerCode='" + MakerCode + "')";
  743. }
  744. //创客名称
  745. if (!string.IsNullOrEmpty(RealName))
  746. {
  747. condition += " and UserId in (select UserId from UserForRealName where RealName='" + RealName + "')";
  748. }
  749. //商户创客编号
  750. if (!string.IsNullOrEmpty(MerMakerCode))
  751. {
  752. condition += " and MerUserId in (select UserId from UserForMakerCode where MakerCode='" + MerMakerCode + "')";
  753. }
  754. //仓库编号
  755. if (!string.IsNullOrEmpty(StoreNo))
  756. {
  757. condition += " and StoreId in (select StoreId from StoreForCode where Code='" + StoreNo + "')";
  758. }
  759. //仓库名称
  760. if (!string.IsNullOrEmpty(RealName))
  761. {
  762. condition += " and StoreId in (select StoreId from StoreForName where Name='" + StoreName + "')";
  763. }
  764. //商户状态
  765. if (!string.IsNullOrEmpty(MerStatusSelect))
  766. {
  767. condition += " and MerStatus=" + MerStatusSelect;
  768. }
  769. //商户激活状态
  770. if (!string.IsNullOrEmpty(ActiveStatusSelect))
  771. {
  772. condition += " and ActiveStatus=" + ActiveStatusSelect;
  773. }
  774. //激活类型
  775. if (!string.IsNullOrEmpty(ActTypeSelect))
  776. {
  777. condition += " and ActType=" + ActTypeSelect;
  778. }
  779. //商户创客类型
  780. if (!string.IsNullOrEmpty(MerUserTypeSelect))
  781. {
  782. condition += " and MerUserType=" + MerUserTypeSelect;
  783. }
  784. Dictionary<string, object> obj = new AdminContentOther(_accessor.HttpContext, PublicFunction.MainTables).IndexData("PosMerchantInfo", Fields, "Id desc", "0", 1, 20000, condition, "MerchantNo,MerchantName,MerchantMobile,KqMerNo,KqSnNo,MerStatus,ActiveStatus,UserId,MerUserId,SnType,SnApplyUserId,KqRegTime,ActType,SnStoreId,TopUserId,MerUserType,RebateQual", false);
  785. List<Dictionary<string, object>> diclist = obj["data"] as List<Dictionary<string, object>>;
  786. foreach (Dictionary<string, object> dic in diclist)
  787. {
  788. //直属创客
  789. int UserId = int.Parse(dic["UserId"].ToString());
  790. Users puser = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
  791. dic["MakerCode"] = puser.MakerCode;
  792. dic["RealName"] = puser.RealName;
  793. //顶级创客
  794. int TopUserId = int.Parse(dic["TopUserId"].ToString());
  795. Users tuser = db.Users.FirstOrDefault(m => m.Id == TopUserId) ?? new Users();
  796. dic["TopMakerCode"] = tuser.MakerCode;
  797. dic["TopRealName"] = tuser.RealName;
  798. //商户创客
  799. int MerUserId = int.Parse(dic["MerUserId"].ToString());
  800. Users muser = db.Users.FirstOrDefault(m => m.Id == MerUserId) ?? new Users();
  801. dic["MerMakerCode"] = muser.MakerCode;
  802. dic["MerRealName"] = muser.RealName;
  803. //申请创客
  804. int SnApplyUserId = int.Parse(dic["SnApplyUserId"].ToString());
  805. Users snuser = db.Users.FirstOrDefault(m => m.Id == SnApplyUserId) ?? new Users();
  806. dic["SnApplyMakerCode"] = snuser.MakerCode;
  807. dic["SnApplyRealName"] = snuser.RealName;
  808. //SN仓库
  809. int SnStoreId = int.Parse(dic["SnStoreId"].ToString());
  810. StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.Id == SnStoreId) ?? new StoreHouse();
  811. dic["StoreNo"] = store.StoreNo;
  812. dic["StoreName"] = store.StoreName;
  813. //机具类型
  814. int SnType = int.Parse(dic["SnType"].ToString());
  815. if (SnType == 0) dic["SnType"] = "兑换机具";
  816. if (SnType == 1) dic["SnType"] = "循环机具";
  817. //返利资格
  818. dic["RebateQual"] = dic["RebateQual"].ToString() == "1" ? "是" : "否";
  819. //激活类型
  820. int ActType = int.Parse(dic["ActType"].ToString());
  821. if (ActType == 0) dic["ActType"] = "正常激活";
  822. if (ActType == 1) dic["ActType"] = "首次已激活MPOS";
  823. if (ActType == 2) dic["ActType"] = "首次已激活KPOS";
  824. if (ActType == 3) dic["ActType"] = "循环机划拨激活";
  825. //商户状态
  826. int MerStatus = int.Parse(dic["MerStatus"].ToString());
  827. if (MerStatus == 0) dic["MerStatus"] = "正常";
  828. if (MerStatus == 1) dic["MerStatus"] = "冻结";
  829. if (MerStatus == 2) dic["MerStatus"] = "关闭";
  830. //商户激活状态
  831. int ActiveStatus = int.Parse(dic["ActiveStatus"].ToString());
  832. if (ActiveStatus == 0) dic["ActiveStatus"] = "未激活";
  833. if (ActiveStatus == 1) dic["ActiveStatus"] = "已激活";
  834. if (ActiveStatus == 2) dic["ActiveStatus"] = "SN已返现";
  835. //商户创客类型
  836. int MerUserType = int.Parse(dic["MerUserType"].ToString());
  837. if (MerUserType == 0) dic["MerUserType"] = "非商户型创客";
  838. if (MerUserType == 1) dic["MerUserType"] = "商户型创客";
  839. dic.Remove("UserId");
  840. dic.Remove("TopUserId");
  841. dic.Remove("MerUserId");
  842. dic.Remove("SnApplyUserId");
  843. dic.Remove("SnStoreId");
  844. }
  845. Dictionary<string, object> result = new Dictionary<string, object>();
  846. result.Add("Status", "1");
  847. result.Add("Info", "Excel报表-" + DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss") + ".xlsx");
  848. result.Add("Obj", diclist);
  849. Dictionary<string, object> ReturnFields = new Dictionary<string, object>();
  850. ReturnFields.Add("MerchantNo", "商户编号");
  851. ReturnFields.Add("MerchantName", "商户名称");
  852. ReturnFields.Add("MerchantMobile", "商户手机号");
  853. ReturnFields.Add("KqMerNo", "快钱商户编码");
  854. ReturnFields.Add("KqSnNo", "快钱SN号");
  855. ReturnFields.Add("SnType", "机具类型");
  856. ReturnFields.Add("RebateQual", "返利资格");
  857. ReturnFields.Add("ActType", "激活类型");
  858. ReturnFields.Add("MerStatus", "商户状态");
  859. ReturnFields.Add("ActiveStatus", "商户激活状态");
  860. ReturnFields.Add("MerMakerCode", "商户创客编码");
  861. ReturnFields.Add("MerRealName", "商户创客名称");
  862. ReturnFields.Add("MerUserType", "商户创客类型");
  863. ReturnFields.Add("MakerCode", "直属创客编号");
  864. ReturnFields.Add("RealName", "直属创客姓名");
  865. ReturnFields.Add("TopMakerCode", "顶级创客编码");
  866. ReturnFields.Add("TopRealName", "顶级创客名称");
  867. ReturnFields.Add("StoreNo", "SN仓库编号");
  868. ReturnFields.Add("StoreName", "SN仓库名称");
  869. ReturnFields.Add("SnApplyMakerCode", "申请创客编号");
  870. ReturnFields.Add("SnApplyRealName", "申请创客姓名");
  871. ReturnFields.Add("KqRegTime", "注册时间");
  872. result.Add("Fields", ReturnFields);
  873. AddSysLog("0", "PosMerchantInfo", "ExportExcel");
  874. return Json(result);
  875. }
  876. #endregion
  877. #region 同步交易额
  878. public IActionResult SycnTradeAmount(string right, int Id = 0)
  879. {
  880. ViewBag.RightInfo = RightInfo;
  881. ViewBag.right = right;
  882. PosMerchantInfo editData = db.PosMerchantInfo.FirstOrDefault(m => m.Id == Id) ?? new PosMerchantInfo();
  883. ViewBag.data = editData;
  884. return View();
  885. }
  886. #endregion
  887. #region 同步交易额
  888. [HttpPost]
  889. public string SycnTradeAmountDo(DateTime sdate, DateTime edate, int MerchantId)
  890. {
  891. if (sdate.AddMonths(1) < edate)
  892. {
  893. return "时间间隔不能超过1个月";
  894. }
  895. if (edate >= DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd") + " 00:00:00"))
  896. {
  897. return "结束时间只能是今天之前";
  898. }
  899. string check = RedisDbconn.Instance.Get<string>("ResetMerchantTradeQueue:" + MerchantId);
  900. if (!string.IsNullOrEmpty(check))
  901. {
  902. return "请稍后再试";
  903. }
  904. try
  905. {
  906. RedisDbconn.Instance.AddList("ResetMerchantTradeQueue", MerchantId + "#cut#" + sdate.ToString("yyyy-MM-dd HH:mm:ss") + "#cut#" + edate.ToString("yyyy-MM-dd HH:mm:ss"));
  907. RedisDbconn.Instance.Set("ResetMerchantTradeQueue:" + MerchantId, "wait");
  908. RedisDbconn.Instance.SetExpire("ResetMerchantTradeQueue:" + MerchantId, 3600);
  909. }
  910. catch (Exception ex)
  911. {
  912. function.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "统计商户的交易额异常");
  913. return "同步异常";
  914. }
  915. return "success";
  916. }
  917. #endregion
  918. }
  919. }