From d0d64cf47ce37027307ceb64dc72e3ae36796a92 Mon Sep 17 00:00:00 2001 From: zhangc <zc@123> Date: 星期四, 27 二月 2025 18:28:00 +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