diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/material/service/impl/MaterialServiceImpl.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/material/service/impl/MaterialServiceImpl.java index 85a8bb1..6900fd7 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/material/service/impl/MaterialServiceImpl.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/material/service/impl/MaterialServiceImpl.java @@ -65,6 +65,7 @@ public class MaterialServiceImpl implements MaterialService @Autowired private ILogImportDetailService logImportDetailService; + @Autowired private TransactionTemplate transactionTemplate; diff --git a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/unit/service/impl/UnitServiceImpl.java b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/unit/service/impl/UnitServiceImpl.java index 04de24c..6807add 100644 --- a/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/unit/service/impl/UnitServiceImpl.java +++ b/common-ruoyi/ruoyi-system/src/main/java/com/ruoyi/yh/unit/service/impl/UnitServiceImpl.java @@ -65,6 +65,8 @@ public class UnitServiceImpl implements UnitService @Autowired private ILogImportDetailService logImportDetailService; + + @Autowired private TransactionTemplate transactionTemplate; /** @@ -142,7 +144,7 @@ public class UnitServiceImpl implements UnitService @Override public void sync(Long operaId) { // 新增一个日志 - LogImportVO importLog = logImportService.addDefaultLog(LogImportType.SYNC, LogImportBizType.MATERIAL, operaId); + LogImportVO importLog = logImportService.addDefaultLog(LogImportType.SYNC, LogImportBizType.UNIT, operaId); ServiceUtil.assertion(importLog == null, "创建同步日志失败"); Long logId = importLog.getLogId();