From 3fbde4dd7e79fdb11f1fd140de0d5ada1f16d04d Mon Sep 17 00:00:00 2001 From: zhangc <zc@123> Date: 星期二, 11 二月 2025 08:15:58 +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