From 9d0389f521468e959e1d2803c42f69153f160c74 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期五, 02 八月 2024 09:15:37 +0800
Subject: [PATCH] #
---
zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskLogTimer.java | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskLogTimer.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskLogTimer.java
index 86a640f..2ede7d5 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskLogTimer.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/timer/TaskLogTimer.java
@@ -11,6 +11,7 @@
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.util.Date;
import java.util.List;
@@ -122,7 +123,7 @@
order.setOrderSettle(OrderSettleType.COMPLETE.val());
order.setUpdateTime(new Date());
- if (!orderService.save(order)) {
+ if (!orderService.updateById(order)) {
throw new CoolException("璁㈠崟鏇存柊澶辫触");
}
}
@@ -133,6 +134,7 @@
} catch (Exception e) {
e.printStackTrace();
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
}finally {
InterceptorIgnoreHelper.clearIgnoreStrategy();
}
@@ -146,6 +148,7 @@
} catch (Exception e) {
e.printStackTrace();
+ TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
}finally {
InterceptorIgnoreHelper.clearIgnoreStrategy();
}
--
Gitblit v1.9.1