ariesy 增加注解&插入日志时捕获异常

release
yefei 2 years ago
parent c7125c4e97
commit 4b9521ed1a
  1. 11
      dxhy-core/src/main/java/com/dxhy/core/job/service/impl/InvoiceInterfaceServiceImpl.java

@ -616,7 +616,7 @@ public class InvoiceInterfaceServiceImpl implements InvoiceInterfaceService {
* @param db 数据库
*/
@Transactional(rollbackFor = Exception.class)
public void invoiceSelectConsumer(String responseJson, TDxHttpLog httpLog, String taxno, String db) {
public void invoiceSelectConsumer(String responseJson, TDxHttpLog httpLog, String taxno, String db) throws Exception {
String total = "";
try {
@ -760,13 +760,20 @@ public class InvoiceInterfaceServiceImpl implements InvoiceInterfaceService {
}
}catch (Exception e){
e.printStackTrace();
throw new Exception(e);
}
} catch (Exception e) {
httpLog.setStatus("2");
httpLog.setTotal(total);
confirmDao.insert(httpLog);
try {
confirmDao.insert(httpLog);
}catch (Exception exe){
exe.printStackTrace();
throw new Exception(exe);
}
e.printStackTrace();
throw new Exception(e);
}
}

Loading…
Cancel
Save