TestHelper.cs 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading;
  4. using System.Linq;
  5. using System.Data;
  6. using MySystem;
  7. using MySystem.PxcModels;
  8. using Library;
  9. public class TestHelper
  10. {
  11. public readonly static TestHelper Instance = new TestHelper();
  12. private TestHelper()
  13. {
  14. }
  15. public void Start()
  16. {
  17. Thread th = new Thread(tmpgo);
  18. th.IsBackground = true;
  19. th.Start();
  20. }
  21. public void StartEverDay()
  22. {
  23. OtherMySqlConn.connstr = Library.ConfigurationManager.AppSettings["Pxc1SqlConnStr"].ToString();
  24. DateTime end = DateTime.Parse("2022-04-19 00:00:00");
  25. DateTime check = DateTime.Parse("2022-03-11");
  26. while (check <= end)
  27. {
  28. StatMerchantTrade(check.ToString("yyyy-MM-dd"));
  29. check = check.AddDays(1);
  30. }
  31. }
  32. private void StatMerchantTrade(string date)
  33. {
  34. Utils.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"), "执行商户交易额日志");
  35. WebCMSEntities db = new WebCMSEntities();
  36. try
  37. {
  38. DataTable selfdt = OtherMySqlConn.dtable("select MerchantId,BrandId,DATE_FORMAT(CreateDate,'%Y-%m-%d') as TradeDate,sum(TradeAmount) as TradeAmount from TradeRecord group by MerchantId,BrandId,DATE_FORMAT(CreateDate,'%Y-%m-%d') order by MerchantId,BrandId,DATE_FORMAT(CreateDate,'%Y-%m-%d')");
  39. foreach (DataRow selfDr in selfdt.Rows)
  40. {
  41. int BrandId = int.Parse(selfDr["BrandId"].ToString());
  42. int MerchantId = int.Parse(selfDr["MerchantId"].ToString());
  43. string TradeDate = selfDr["TradeDate"].ToString();
  44. TradeDate = TradeDate.Replace("-", "");
  45. string TradeMonth = TradeDate.Substring(0, 6);
  46. decimal TradeAmount = decimal.Parse(selfDr["TradeAmount"].ToString());
  47. PosMerchantTradeSummay merStat = db.PosMerchantTradeSummay.FirstOrDefault(m => m.MerchantId == MerchantId && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.BrandId == BrandId);
  48. if (merStat == null)
  49. {
  50. merStat = db.PosMerchantTradeSummay.Add(new PosMerchantTradeSummay()
  51. {
  52. MerchantId = MerchantId,
  53. TradeMonth = TradeMonth,
  54. TradeDate = TradeDate,
  55. BrandId = BrandId,
  56. }).Entity;
  57. db.SaveChanges();
  58. }
  59. merStat.TradeAmount += TradeAmount;
  60. db.SaveChanges();
  61. }
  62. }
  63. catch (Exception ex)
  64. {
  65. Utils.WriteLog(DateTime.Now.ToString() + "\n" + ex.ToString(), "统计商户的交易额");
  66. }
  67. db.Dispose();
  68. Utils.WriteLog(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "\n\n", "执行商户交易额日志");
  69. }
  70. private void setLdFee()
  71. {
  72. // DataTable dt = CustomerSqlConn.dtable("select KqMerNo,BrandId from PosMerchantInfo where Id in (select BindMerchantId from PosMachinesTwo where BrandId in (10,11) and DownFeeFlag=1 and BindingTime<'2023-08-06 00:00:00')", "server=rm-2vcs4j67tla603c9d5o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsProfitServer;charset=utf8;");
  73. // foreach(DataRow dr in dt.Rows)
  74. // {
  75. // Utils.WriteLog(dr["KqMerNo"].ToString(), "临时设置联动费率日志");
  76. // string result = SetDepositPostService.Instance.LDFeeRate(dr["KqMerNo"].ToString(), "0.0063", int.Parse(dr["BrandId"].ToString()), 0);
  77. // Utils.WriteLog(result + "\n\n", "临时设置联动费率日志");
  78. // }
  79. // Utils.WriteLog("000006026200825805", "临时设置费率日志");
  80. // string result = SetDepositPostService.Instance.SetFeeForSft("40585414", "0.6300", "0");
  81. // Utils.WriteLog(result + "\n\n", "临时设置费率日志");
  82. // Utils.WriteLog("0000320226626450030145", "临时设置费率日志");
  83. // result = SetDepositPostService.Instance.LDFeeRate("110000004265069", "0.0063", 1, 3);
  84. // Utils.WriteLog(result + "\n\n", "临时设置费率日志");
  85. // Utils.WriteLog("0000320226624650409066", "临时设置费率日志");
  86. // result = SetDepositPostService.Instance.LDFeeRate("110000004842951", "0.0063", 1, 3);
  87. // Utils.WriteLog(result + "\n\n", "临时设置费率日志");
  88. // Utils.WriteLog("0000320226636450184893", "临时设置费率日志");
  89. // result = SetDepositPostService.Instance.LDFeeRate("110000004744970", "0.0063", 3, 0);
  90. // Utils.WriteLog(result + "\n\n", "临时设置费率日志");
  91. // Utils.WriteLog("0000320226636450180288", "临时设置费率日志");
  92. // result = SetDepositPostService.Instance.LDFeeRate("110000004760326", "0.0063", 3, 0);
  93. // Utils.WriteLog(result + "\n\n", "临时设置费率日志");
  94. // Utils.WriteLog("00003102702303069483466", "临时设置费率日志");
  95. // string result = SetDepositPostService.Instance.SetFee("M7000615224RVXMbk7", "00003102702303069483466", 0.63M, 300);
  96. // Utils.WriteLog(result + "\n\n", "临时设置费率日志");
  97. // Utils.WriteLog("00000302JBNL01471793", "临时设置费率日志");
  98. // result = SetDepositPostService.Instance.SetFee("M900065131JVMYUBl5", "00000302JBNL01471793", 0.63M, 0);
  99. // Utils.WriteLog(result + "\n\n", "临时设置费率日志");
  100. // return;
  101. bool op = true;
  102. while(op)
  103. {
  104. int page = int.Parse(function.CheckInt(function.ReadInstance("/TmpSetLdFee/page.txt")));
  105. if(page < 1) page = 50;
  106. int skip = (page - 1) * 100;
  107. DataTable dt = CustomerSqlConn.dtable("select KqMerNo,BrandId from PosMerchantInfo where Id in (select BindMerchantId from PosMachinesTwo where BrandId in (10,11) and DownFeeFlag=0 and BindingTime<'2023-08-06 00:00:00') limit " + skip + ",100", "server=rm-2vcs4j67tla603c9d5o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsProfitServer;charset=utf8;");
  108. if(dt.Rows.Count > 0)
  109. {
  110. foreach(DataRow dr in dt.Rows)
  111. {
  112. Utils.WriteLog(dr["KqMerNo"].ToString(), "临时设置联动费率日志");
  113. string result = SetDepositPostService.Instance.LDFeeRate(dr["KqMerNo"].ToString(), "0.0063", int.Parse(dr["BrandId"].ToString()), 3);
  114. Utils.WriteLog(result + "\n\n", "临时设置联动费率日志");
  115. }
  116. page += 1;
  117. function.WritePage("/TmpSetLdFee/", "page.txt", page.ToString());
  118. }
  119. else
  120. {
  121. op = false;
  122. Utils.WriteLog("执行结束\n\n", "临时设置联动费率日志");
  123. }
  124. dt.Dispose();
  125. dt.Clear();
  126. }
  127. }
  128. public void StartJk()
  129. {
  130. Thread th = new Thread(setJkFee);
  131. th.IsBackground = true;
  132. th.Start();
  133. }
  134. private void setJkFee()
  135. {
  136. bool op = true;
  137. while(op)
  138. {
  139. int page = int.Parse(function.CheckInt(function.ReadInstance("/TmpSetJkFee/page.txt")));
  140. if(page < 1) page = 1;
  141. int skip = (page - 1) * 100;
  142. DataTable dt = CustomerSqlConn.dtable("select KqMerNo,KqSnNo from PosMerchantInfo where Id in (select BindMerchantId from PosMachinesTwo where BrandId in (1,3) and (DownFeeFlag=1 or UpFeeFlag=0) and BindingState=1 and BindingTime<'" + DateTime.Now.AddDays(-90).ToString("yyyy-MM-dd HH:mm:ss") + "') limit " + skip + ",100", "server=rm-2vcs4j67tla603c9d5o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsProfitServer;charset=utf8;");
  143. if(dt.Rows.Count > 0)
  144. {
  145. foreach(DataRow dr in dt.Rows)
  146. {
  147. Utils.WriteLog(dr["KqMerNo"].ToString(), "临时设置金控费率日志");
  148. Utils.WriteLog(dr["KqSnNo"].ToString(), "临时设置金控费率日志");
  149. string merNo = dr["KqMerNo"].ToString();
  150. string sn = dr["KqSnNo"].ToString();
  151. string result = SetDepositPostService.Instance.SetFee(merNo, sn, 0.63M, 0);
  152. Utils.WriteLog(result + "\n\n", "临时设置金控费率日志");
  153. }
  154. page += 1;
  155. function.WritePage("/TmpSetJkFee/", "page.txt", page.ToString());
  156. }
  157. else
  158. {
  159. op = false;
  160. Utils.WriteLog("执行结束\n\n", "临时设置金控费率日志");
  161. }
  162. dt.Dispose();
  163. dt.Clear();
  164. }
  165. }
  166. public void StartSft()
  167. {
  168. Thread th = new Thread(setSftFee);
  169. th.IsBackground = true;
  170. th.Start();
  171. }
  172. private void setSftFee()
  173. {
  174. bool op = true;
  175. while(op)
  176. {
  177. int page = int.Parse(function.CheckInt(function.ReadInstance("/TmpSetSftFee/page.txt")));
  178. if(page < 1) page = 1;
  179. int skip = (page - 1) * 100;
  180. DataTable dt = CustomerSqlConn.dtable("select mer.KqMerNo,DownFeeFlag,UpFeeFlag from (select BindMerchantId,DownFeeFlag,UpFeeFlag from PosMachinesTwo where BrandId=7 and BindingState=1 and BindingTime<'" + DateTime.Now.AddDays(-90).ToString("yyyy-MM-dd HH:mm:ss") + "') tb left join PosMerchantInfo mer on tb.BindMerchantId=mer.Id limit " + skip + ",100", "server=rm-2vcs4j67tla603c9d5o.mysql.cn-chengdu.rds.aliyuncs.com;port=3306;user=KxsProfitServer;password=FrW8ZfxlcaVdm1r0;database=KxsProfitServer;charset=utf8;");
  181. if(dt.Rows.Count > 0)
  182. {
  183. foreach(DataRow dr in dt.Rows)
  184. {
  185. Utils.WriteLog(dr["KqMerNo"].ToString(), "临时设置盛付通费率日志");
  186. string merNo = dr["KqMerNo"].ToString();
  187. string DownFeeFlag = dr["DownFeeFlag"].ToString();
  188. string UpFeeFlag = dr["UpFeeFlag"].ToString();
  189. string addRate = "0";
  190. string Fee = "0.6300";
  191. if(UpFeeFlag == "1" && DownFeeFlag == "0")
  192. {
  193. addRate = "3";
  194. }
  195. string result = SetDepositPostService.Instance.SetFeeForSft(merNo, Fee, addRate);
  196. Utils.WriteLog(result + "\n\n", "临时设置盛付通费率日志");
  197. }
  198. page += 1;
  199. function.WritePage("/TmpSetSftFee/", "page.txt", page.ToString());
  200. }
  201. else
  202. {
  203. op = false;
  204. Utils.WriteLog("执行结束\n\n", "临时设置盛付通费率日志");
  205. }
  206. dt.Dispose();
  207. dt.Clear();
  208. }
  209. }
  210. List<string> PosSns = new List<string>();
  211. public void leaderflag()
  212. {
  213. WebCMSEntities db = new WebCMSEntities();
  214. List<int> ids = new List<int>();
  215. // List<PosCouponRecord> records = db.PosCouponRecord.Where(m => m.FromUserId == 597).ToList();
  216. // foreach(PosCouponRecord record in records)
  217. // {
  218. // ids.Add(record.PosCouponId);
  219. // }
  220. ids.Add(37335);
  221. PosSns = db.PosCoupons.Where(m => ids.Contains(m.Id) && m.IsUse == 1).ToList().Select(m => m.ExchangeCode).ToList();
  222. List<PosCoupons> coupons = db.PosCoupons.Where(m => ids.Contains(m.Id) && m.IsUse == 1).ToList();
  223. foreach (PosCoupons coupon in coupons)
  224. {
  225. ChildNo(db, coupon.ExchangeCode, coupon.ExchangeCode, coupon.OpenPrizeUserId);
  226. }
  227. // db.SaveChanges();
  228. db.Dispose();
  229. }
  230. List<string> nos = new List<string>();
  231. private void ChildNo(WebCMSEntities db, string RootCheckNo, string CheckNo, int LeaderUserId)
  232. {
  233. MachineApply apply = db.MachineApply.FirstOrDefault(m => m.SwapSnExpand.Contains(CheckNo));
  234. if(apply != null)
  235. {
  236. int len = 0;
  237. string[] SnList = apply.SwapSnExpand.TrimEnd('\n').Split('\n');
  238. foreach(string sn in SnList)
  239. {
  240. if(PosSns.Contains(sn.Split(':')[0]) || nos.Contains(sn.Split(':')[0]))
  241. {
  242. len += 1;
  243. }
  244. }
  245. Orders order = db.Orders.FirstOrDefault(m => m.Id == apply.QueryCount);
  246. if(order != null)
  247. {
  248. if(!string.IsNullOrEmpty(order.SnNos))
  249. {
  250. if(order.SnNos.Contains(","))
  251. {
  252. string[] SwapSnExpands = order.SnNos.TrimEnd(',').Split(',');
  253. int index = 0;
  254. foreach(string no in SwapSnExpands)
  255. {
  256. if(!nos.Contains(no) && index < len)
  257. {
  258. index += 1;
  259. nos.Add(no);
  260. ChildNo(db, RootCheckNo, no, LeaderUserId);
  261. }
  262. }
  263. }
  264. else
  265. {
  266. string[] SwapSnExpands = order.SnNos.TrimEnd('\n').Split('\n');
  267. int index = 0;
  268. foreach(string no in SwapSnExpands)
  269. {
  270. if(!nos.Contains(no) && index < len)
  271. {
  272. index += 1;
  273. nos.Add(no);
  274. ChildNo(db, RootCheckNo, no, LeaderUserId);
  275. }
  276. }
  277. }
  278. }
  279. else
  280. {
  281. MachineForSnNo forSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == CheckNo) ?? new MachineForSnNo();
  282. PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == forSnNo.SnId);
  283. if(pos != null)
  284. {
  285. // pos.LeaderUserId = LeaderUserId;
  286. // Utils.WriteLog(LeaderUserId + ":" + pos.PosSn + ":" + apply.SwapSnExpand.TrimEnd('\n').Split('\n').Length, "大盟主奖励标记机具");
  287. // Users user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new Users();
  288. // Utils.WriteLog(pos.PosSn + ":" + RootCheckNo + ":" + user.MakerCode + ":" + user.RealName, "大盟主奖励标记机具");
  289. Utils.WriteLog(pos.Id + ":" + LeaderUserId, "开机奖励标记机具");
  290. }
  291. }
  292. }
  293. }
  294. else
  295. {
  296. MachineForSnNo forSnNo = db.MachineForSnNo.FirstOrDefault(m => m.SnNo == CheckNo) ?? new MachineForSnNo();
  297. PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m=>m.Id == forSnNo.SnId);
  298. if(pos != null)
  299. {
  300. // pos.LeaderUserId = LeaderUserId;
  301. // Utils.WriteLog(LeaderUserId + ":" + pos.PosSn, "大盟主奖励标记机具");
  302. // Users user = db.Users.FirstOrDefault(m => m.Id == pos.BuyUserId) ?? new Users();
  303. // Utils.WriteLog(pos.PosSn + ":" + RootCheckNo + ":" + user.MakerCode + ":" + user.RealName, "大盟主奖励标记机具");
  304. Utils.WriteLog(pos.Id + ":" + LeaderUserId, "开机奖励标记机具");
  305. }
  306. }
  307. }
  308. public void tmpdo()
  309. {
  310. string check = function.ReadInstance("/tmpdo.txt");
  311. if(!string.IsNullOrEmpty(check))
  312. {
  313. return;
  314. }
  315. function.WritePage("/", "tmpdo.txt", DateTime.Now.ToString());
  316. WebCMSEntities db = new WebCMSEntities();
  317. List<string> list = new List<string>();
  318. list.Add("2024-10-19 21:04:55,119.00,360,1182462634");
  319. List<int> bids = new List<int>();
  320. bids.Add(23);
  321. bids.Add(24);
  322. bids.Add(25);
  323. bids.Add(26);
  324. bids.Add(32);
  325. List<Users> users = db.Users.Where(m => m.AuthFlag == 1).ToList();
  326. Utils.WriteLog("1--" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"), "统计来量吧漏掉的交易");
  327. List<PosMachinesTwo> posList = db.PosMachinesTwo.Where(m => bids.Contains(m.BrandId)).ToList();
  328. Utils.WriteLog("2--" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"), "统计来量吧漏掉的交易");
  329. List<WifiTradeRecord> tradeList = db.WifiTradeRecord.ToList();
  330. Utils.WriteLog("3--" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"), "统计来量吧漏掉的交易");
  331. List<TradeDaySummary> statList = db.TradeDaySummary.Where(m => m.Id >= 22361221 && bids.Contains(m.BrandId)).ToList();
  332. Utils.WriteLog("4--" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff"), "统计来量吧漏掉的交易");
  333. statNew = new List<TradeDaySummary>();
  334. foreach(string sub in list)
  335. {
  336. string[] data = sub.Split(',');
  337. string PosSn = data[3];
  338. DateTime TradeTime = DateTime.Parse(data[0]);
  339. decimal TradeAmount = decimal.Parse(data[1]);
  340. int Months = int.Parse(data[2]) / 30;
  341. decimal TradeAmt = TradeAmount / Months;
  342. TradeAmt = PublicFunction.NumberFormat(TradeAmt);
  343. string TradeMonth = TradeTime.AddMonths(-1).ToString("yyyyMM");
  344. PosMachinesTwo pos = posList.FirstOrDefault(m => m.PosSn == PosSn) ?? new PosMachinesTwo();
  345. bool statFlag = tradeList.Any(m => m.SnNo == PosSn && m.CreateDate < TradeTime);
  346. if(statFlag)
  347. {
  348. TradeDaySummary stat = statList.Where(m => m.UserId == pos.BuyUserId && m.BrandId == pos.BrandId).OrderByDescending(m => m.Id).FirstOrDefault() ?? new TradeDaySummary();
  349. TradeMonth = string.IsNullOrEmpty(stat.TradeMonth) ? TradeTime.AddMonths(-1).ToString("yyyyMM") : stat.TradeMonth;
  350. }
  351. DateTime StartMonth = DateTime.Parse(TradeMonth.Substring(0, 4) + "-" + TradeMonth.Substring(4, 2) + "-01 00:00:00");
  352. for (int i = 1; i <= Months; i++)
  353. {
  354. StartMonth = StartMonth.AddMonths(1);
  355. StatTrade(users, pos.BuyUserId, pos.BrandId, StartMonth.ToString("yyyyMM"), TradeAmt);
  356. }
  357. Utils.WriteLog(sub, "统计来量吧漏掉的交易");
  358. }
  359. int index = 0;
  360. foreach(TradeDaySummary subData in statNew)
  361. {
  362. index += 1;
  363. if(index > 8740)
  364. {
  365. RedisDbconn.Instance.AddList("TmpAddTradeDaySummaryQueue", subData);
  366. Utils.WriteLog(index.ToString(), "统计来量吧漏掉的交易");
  367. }
  368. }
  369. db.Dispose();
  370. Utils.WriteLog("end", "统计来量吧漏掉的交易");
  371. }
  372. public void tmpgo()
  373. {
  374. WebCMSEntities db = new WebCMSEntities();
  375. bool op = true;
  376. int index = 0;
  377. while(op)
  378. {
  379. TradeDaySummary trade = RedisDbconn.Instance.RPop<TradeDaySummary>("TmpAddTradeDaySummaryQueue");
  380. if(trade != null)
  381. {
  382. index += 1;
  383. db.TradeDaySummary.Add(trade);
  384. if(index % 20 == 0)
  385. {
  386. db.SaveChanges();
  387. }
  388. }
  389. else
  390. {
  391. op = false;
  392. }
  393. }
  394. db.Dispose();
  395. }
  396. List<TradeDaySummary> statNew = new List<TradeDaySummary>();
  397. public void StatTrade(List<Users> users, int UserId, int BrandId, string TradeMonth, decimal TradeAmount)
  398. {
  399. Users user = users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
  400. string ParentNav = user.ParentNav;
  401. string TradeDate = TradeMonth + "01";
  402. ParentNav += "," + UserId + ",";
  403. TradeDaySummary selfStat = statNew.FirstOrDefault(m => m.UserId == UserId && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.BrandId == BrandId && m.SeoTitle == "self");
  404. if (selfStat == null)
  405. {
  406. statNew.Add(new TradeDaySummary()
  407. {
  408. UserId = UserId,
  409. TradeMonth = TradeMonth,
  410. TradeDate = TradeDate,
  411. BrandId = BrandId,
  412. SeoTitle = "self",
  413. HelpDirectTradeAmt = TradeAmount
  414. });
  415. }
  416. else
  417. {
  418. selfStat.HelpDirectTradeAmt += TradeAmount;
  419. }
  420. if (!string.IsNullOrEmpty(ParentNav))
  421. {
  422. string[] ParentNavList = ParentNav.Trim(',').Replace(",,", ",").Split(',');
  423. foreach (string NavUserIdString in ParentNavList)
  424. {
  425. int NavUserId = int.Parse(NavUserIdString);
  426. TradeDaySummary teamStat = statNew.FirstOrDefault(m => m.UserId == NavUserId && m.TradeMonth == TradeMonth && m.TradeDate == TradeDate && m.BrandId == BrandId && m.SeoTitle == "team");
  427. if (teamStat == null)
  428. {
  429. statNew.Add(new TradeDaySummary()
  430. {
  431. UserId = NavUserId,
  432. TradeMonth = TradeMonth,
  433. TradeDate = TradeDate,
  434. BrandId = BrandId,
  435. SeoTitle = "team",
  436. HelpNonDirectTradeAmt = TradeAmount
  437. });
  438. }
  439. else
  440. {
  441. teamStat.HelpNonDirectTradeAmt += TradeAmount;
  442. }
  443. }
  444. }
  445. }
  446. }