Преглед на файлове

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

master^2
dyy преди 5 месеца
родител
ревизия
084a1b294f
променени са 1 файла, в които са добавени 14 реда и са изтрити 2 реда
  1. +14
    -2
      DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs

+ 14
- 2
DigitalSchoolApi/Controllers/PayFeeResultTwoController.cs Целия файл

@@ -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";


Зареждане…
Отказ
Запис