浏览代码

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

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)) using (IDbConnection conn = new SqlConnection(_sqlConnection))
{ {
List<FinaChargeStuOrderEntity> stuorderlist = null; 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(); group by StuNo, YearNo, FSYId, PayMode").ToList();
foreach (var stuorderEntity in stuorderlist) foreach (var stuorderEntity in stuorderlist)
{ {
@@ -204,7 +204,19 @@ namespace DigitalSchoolApi.Controllers
byte[] payload = encoding.GetBytes(par); byte[] payload = encoding.GetBytes(par);
HttpClient httpClient = new HttpClient(); HttpClient httpClient = new HttpClient();
HttpContent content = new ByteArrayContent(payload); 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); xml.LoadXml(reStr);
string s = ((XmlElement)xml.SelectSingleNode("TX/RETURN_CODE")).InnerText; string s = ((XmlElement)xml.SelectSingleNode("TX/RETURN_CODE")).InnerText;
//string s = "000000"; //string s = "000000";


正在加载...
取消
保存