Quellcode durchsuchen

【修改】缴费后处理的方法中增加日志输出;

master^2
dyy vor 5 Monaten
Ursprung
Commit
084a1b294f
1 geänderte Dateien mit 14 neuen und 2 gelöschten Zeilen
  1. +14
    -2
      DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs

+ 14
- 2
DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs Datei anzeigen

@@ -158,7 +158,7 @@ namespace DigitalSchoolApi.Controllers
using (IDbConnection conn = new SqlConnection(_sqlConnection))
{
List<FinaChargeStuOrderEntity> stuorderlist = null;
stuorderlist = conn.Query<FinaChargeStuOrderEntity>(@"select StuNo,YearNo,FSYId,'ExcelOffLine' as PayMode from FinaChargeStuOrder where Status=1 and fsyid='"+ FSYID + @"'
stuorderlist = conn.Query<FinaChargeStuOrderEntity>(@"select StuNo,YearNo,FSYId,'ExcelOffLine' as PayMode from FinaChargeStuOrder where Status=1 and fsyid='" + FSYID + @"'
group by StuNo, YearNo, FSYId, PayMode").ToList();
foreach (var stuorderEntity in stuorderlist)
{
@@ -204,7 +204,19 @@ namespace DigitalSchoolApi.Controllers
byte[] payload = encoding.GetBytes(par);
HttpClient httpClient = new HttpClient();
HttpContent content = new ByteArrayContent(payload);
string reStr = httpClient.PostAsync(payresulturl, content).Result.Content.ReadAsStringAsync().Result;
string reStr = string.Empty;
try
{
reStr = httpClient.PostAsync(payresulturl, content).Result.Content.ReadAsStringAsync().Result;
}
catch (Exception e)
{
using (IDbConnection conncore = new SqlConnection(_coresqlConnection))
{
conncore.Execute(
"insert into LR_Base_Log(F_LogId,F_CategoryId,F_SourceObjectId,F_SourceContentJson,F_OperateTime) values(newid(),121,'ccb','对接支付结果地址接口失败:" + reStr + ":" + e.Message + ":" + e.StackTrace + "',getdate())");
}
}
xml.LoadXml(reStr);
string s = ((XmlElement)xml.SelectSingleNode("TX/RETURN_CODE")).InnerText;
//string s = "000000";


Laden…
Abbrechen
Speichern