|
@@ -129,7 +129,7 @@ namespace MySystem
|
|
|
ConsumerOrders order = db.ConsumerOrders.FirstOrDefault(m => m.Id == sub.Id);
|
|
|
if (order != null)
|
|
|
{
|
|
|
- order.Status = 2;
|
|
|
+ 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();
|
|
|
if (order.IsAct == 1 && order.PayMoney >= set.MinPayMoney)
|
|
@@ -147,7 +147,11 @@ namespace MySystem
|
|
|
string acctType = "0"; //账户类型(0:商户收款账户(大B),1:分账接收方账户(小B))
|
|
|
decimal amount = fee * (1M - 0.0038M) * 100 - fee; //金额(分)手续费
|
|
|
string seviceAmount = fee.ToString("f0"); //服务费
|
|
|
- HaoDaHelper.Instance.OrderDivideAccounts(OrderDivideAccountsUtil.AddValue(applyNo, mchtNo, orderNo, acctNo, sacctNo, acctType, amount.ToString("f0"), seviceAmount));
|
|
|
+ string result = HaoDaHelper.Instance.OrderDivideAccounts(OrderDivideAccountsUtil.AddValue(applyNo, mchtNo, orderNo, acctNo, sacctNo, acctType, amount.ToString("f0"), seviceAmount));
|
|
|
+ if(result.Contains("\"resultCode\":\"0\"") && result.Contains("分账金额不足"))
|
|
|
+ {
|
|
|
+ Status = 1;
|
|
|
+ }
|
|
|
|
|
|
//开始监听分账状态
|
|
|
Dictionary<string, object> req = new Dictionary<string, object>();
|
|
@@ -161,6 +165,7 @@ namespace MySystem
|
|
|
RedisDbconn.Instance.AddList("ConsumerOrdersHd:Divi:2:List", order.Id.ToString());
|
|
|
}
|
|
|
}
|
|
|
+ order.Status = Status;
|
|
|
}
|
|
|
}
|
|
|
db.SaveChanges();
|