|
@@ -493,5 +493,48 @@ namespace MySystem
|
|
|
// ZBankNo
|
|
|
db.Dispose();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void refund()
|
|
|
+ {
|
|
|
+ Thread th = new Thread(refunddo);
|
|
|
+ th.IsBackground = true;
|
|
|
+ th.Start();
|
|
|
+ }
|
|
|
+ public void refunddo()
|
|
|
+ {
|
|
|
+ for(int month = 10; month <= 11; month ++)
|
|
|
+ {
|
|
|
+ for(int day = 1; day <= 31; day ++)
|
|
|
+ {
|
|
|
+ string content = function.ReadInstance("/log/好哒聚合支付退款/2023/" + month + "/" + day + "/content.log");
|
|
|
+ if(!string.IsNullOrEmpty(content))
|
|
|
+ {
|
|
|
+ content = content.Replace("\n\n\n", "####");
|
|
|
+ content = content.Replace("\n", "");
|
|
|
+ content = content.Replace("####", "\n");
|
|
|
+ MatchCollection mc = Regex.Matches(content, "请求参数.*?退款次数超出限制");
|
|
|
+ foreach(Match m in mc)
|
|
|
+ {
|
|
|
+ string mchtNo = Regex.Match(m.Value, "\"mchtNo\":\".*?\"").Value.Replace("\"mchtNo\":\"", "").Replace("\"", "");
|
|
|
+ string storeNo = Regex.Match(m.Value, "\"storeNo\":\".*?\"").Value.Replace("\"storeNo\":\"", "").Replace("\"", "");
|
|
|
+ string outOrderNo = Regex.Match(m.Value, "\"outOrderNo\":\".*?\"").Value.Replace("\"outOrderNo\":\"", "").Replace("\"", "");
|
|
|
+ string refundAmount = Regex.Match(m.Value, "\"refundAmount\":\".*?\"").Value.Replace("\"refundAmount\":\"", "").Replace("\"", "");
|
|
|
+ function.WriteLog("mchtNo:" + mchtNo + ";storeNo:" + storeNo + ";outOrderNo:" + outOrderNo + ";refundAmount:" + refundAmount + ";", "补充退款日志");
|
|
|
+ var info = HaoDaHelper.Instance.AggregatedPayRefund(mchtNo, storeNo, "HDTK" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8), outOrderNo, refundAmount);
|
|
|
+ function.WriteLog(info + "\n\n", "补充退款日志");
|
|
|
+ Thread.Sleep(1000);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|