diff --git a/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/InvoiceInterfaceServiceImpl.java b/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/InvoiceInterfaceServiceImpl.java index 8d003c3d..669e027b 100644 --- a/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/InvoiceInterfaceServiceImpl.java +++ b/dxhy-core/src/main/java/com/dxhy/core/job/service/impl/InvoiceInterfaceServiceImpl.java @@ -615,6 +615,7 @@ public class InvoiceInterfaceServiceImpl implements InvoiceInterfaceService { * @param taxno 税号 * @param db 数据库 */ + @Transactional(rollbackFor = Exception.class) public void invoiceSelectConsumer(String responseJson, TDxHttpLog httpLog, String taxno, String db) { String total = ""; @@ -752,9 +753,13 @@ public class InvoiceInterfaceServiceImpl implements InvoiceInterfaceService { } httpLog.setStatus("1"); httpLog.setTotal(total); - confirmDao.insert(httpLog); - if (logList.size() > 0) { - invoiceLogService.toInvoiceLog(logList); + try { + confirmDao.insert(httpLog); + if (logList.size() > 0) { + invoiceLogService.toInvoiceLog(logList); + } + }catch (Exception e){ + e.printStackTrace(); } } catch (Exception e) {