|
@@ -46,7 +46,7 @@ namespace MySystem
|
|
|
|
|
|
// HaoDaHelper.Instance.OrderDivideAccountsQuery("FZ2023110315225748140470708", "1492500"); //查询分账结果
|
|
|
// WebCMSEntities db = new WebCMSEntities();
|
|
|
-
|
|
|
+
|
|
|
// List<int> ids = new List<int>();
|
|
|
// foreach(int id in ids)
|
|
|
// {
|
|
@@ -175,7 +175,7 @@ namespace MySystem
|
|
|
int Status = 2;
|
|
|
MerchantInfo merchant = db.MerchantInfo.FirstOrDefault(m => m.Id == order.MerchantId) ?? new MerchantInfo();
|
|
|
MerchantParamSet set = db.MerchantParamSet.FirstOrDefault(m => m.Id == order.MerchantId) ?? new MerchantParamSet();
|
|
|
-
|
|
|
+
|
|
|
MerchantAddInfo merchantAdd = db.MerchantAddInfo.FirstOrDefault(m => m.Id == order.MerchantId) ?? new MerchantAddInfo();
|
|
|
//发起分账
|
|
|
string applyNo = "FZ" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + function.get_Random(8); //批次号
|
|
@@ -186,7 +186,7 @@ namespace MySystem
|
|
|
string acctType = "0"; //账户类型(0:商户收款账户(大B),1:分账接收方账户(小B))
|
|
|
decimal amount = order.PayMoney * (1M - 0.0038M) * 100;
|
|
|
string result = HaoDaHelper.Instance.OrderDivideAccounts(OrderDivideAccountsUtil.AddValue(applyNo, mchtNo, orderNo, acctNo, sacctNo, acctType, amount.ToString().Split('.')[0], "0"));
|
|
|
- if(result.Contains("\"resultCode\":\"0\"") && result.Contains("分账金额不足"))
|
|
|
+ if (result.Contains("\"resultCode\":\"0\"") && result.Contains("分账金额不足"))
|
|
|
{
|
|
|
Status = 1;
|
|
|
}
|
|
@@ -313,11 +313,11 @@ namespace MySystem
|
|
|
merchant.QueryCount = 2;
|
|
|
info.AlipayRemark = "";
|
|
|
LogHelper.Instance.WriteLog("start2end", "查询支付宝商户意愿申请状态");
|
|
|
- // if (merchant.Latitude == 0)
|
|
|
- // {
|
|
|
- // //签约成功调用腾讯地图接口获取地址
|
|
|
- // RedisDbconn.Instance.AddList("GetTencentAddressInfoQueue", "{\"Address\":\"" + merchant.Areas + merchant.Address + "\"}");
|
|
|
- // }
|
|
|
+ if (merchant.Latitude == 0)
|
|
|
+ {
|
|
|
+ //签约成功调用腾讯地图接口获取地址
|
|
|
+ RedisDbconn.Instance.AddList("GetTencentAddressInfoQueue", "{\"MerChantId\":\"" + merchant.Id + "\",\"Address\":\"" + merchant.Areas + merchant.Address + "\"}");
|
|
|
+ }
|
|
|
db.SaveChanges();
|
|
|
}
|
|
|
// else
|
|
@@ -394,7 +394,7 @@ namespace MySystem
|
|
|
WebCMSEntities db = new WebCMSEntities();
|
|
|
MerchantAddInfo info = db.MerchantAddInfo.FirstOrDefault(m => m.Id == Id) ?? new MerchantAddInfo();
|
|
|
string result = WeChatFunctionForHD.Instance.QueryMerchant(ApplymentId);
|
|
|
-
|
|
|
+
|
|
|
Dictionary<string, object> reqdic = new Dictionary<string, object>();
|
|
|
reqdic.Add("Id", Id); // 商户Id
|
|
|
reqdic.Add("ApplymentId", ApplymentId); // 商户Id
|
|
@@ -593,14 +593,14 @@ namespace MySystem
|
|
|
// ZBankNo
|
|
|
db.Dispose();
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
public void refund()
|
|
|
{
|
|
|
Thread th = new Thread(refunddo);
|
|
@@ -609,23 +609,23 @@ namespace MySystem
|
|
|
}
|
|
|
public void refunddo()
|
|
|
{
|
|
|
- for(int month = 10; month <= 11; month ++)
|
|
|
+ for (int month = 10; month <= 11; month++)
|
|
|
{
|
|
|
- for(int day = 1; day <= 31; day ++)
|
|
|
+ for (int day = 1; day <= 31; day++)
|
|
|
{
|
|
|
string content = function.ReadInstance("/log/好哒聚合支付退款/2023/" + month + "/" + day + "/content.log");
|
|
|
- if(!string.IsNullOrEmpty(content))
|
|
|
+ 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)
|
|
|
+ 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("\"", "");
|
|
|
+ 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", "补充退款日志");
|
|
@@ -635,6 +635,6 @@ namespace MySystem
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|