From e90dba0edc93be26e1509cfb2ec1d0681eb86e48 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期三, 27 八月 2025 08:37:04 +0800 Subject: [PATCH] 合并出库添加日志 --- src/main/java/com/zy/asrs/task/handler/OverYearLogHandler.java | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/handler/OverYearLogHandler.java b/src/main/java/com/zy/asrs/task/handler/OverYearLogHandler.java index 62b7596..3c099df 100644 --- a/src/main/java/com/zy/asrs/task/handler/OverYearLogHandler.java +++ b/src/main/java/com/zy/asrs/task/handler/OverYearLogHandler.java @@ -34,4 +34,19 @@ return SUCCESS; } + @Transactional + public ReturnT<String> start2() { + try { + // 鍒犻櫎鍗婂勾浠ヤ笂鐨勫巻鍙叉。 + jdbcTemplate.update("delete from man_order_log where dateadd(day,366,create_time) <= getdate();"); + jdbcTemplate.update("delete from man_order_detl_log where dateadd(day,366,create_time) <= getdate();"); + + } catch (Exception e) { + e.printStackTrace(); + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + return FAIL.setMsg(e.getMessage()); + } + return SUCCESS; + } + } -- Gitblit v1.9.1