no message

main
HUOJIN\92525 2024-12-17 10:15:49 +08:00
parent ab57324968
commit 327840c4e1
2 changed files with 2 additions and 3 deletions

View File

@ -41,7 +41,6 @@ public interface LogRepository extends JpaRepository<Log, Long>, JpaSpecificatio
/**
* sys_log_bk1
*
*/
@Modifying
@Transactional
@ -56,6 +55,6 @@ public interface LogRepository extends JpaRepository<Log, Long>, JpaSpecificatio
*/
@Modifying
@Transactional
@Query(value = "delete from sys_log where create_time < DATE_SUB(NOW(), INTERVAL 1 MONTH) LIMIT 10000 ", nativeQuery = true)
@Query(value = "delete from sys_log where log_id in (SELECT log_id FROM (SELECT log_id FROM sys_log WHERE create_time < DATE_SUB(NOW(), INTERVAL 1 MONTH) LIMIT 10000) tmp) ", nativeQuery = true)
void cleanSysLog();
}

View File

@ -44,6 +44,6 @@ public interface QuartzLogRepository extends JpaRepository<QuartzLog,Long>, JpaS
*/
@Modifying
@Transactional
@Query(value = "delete from sys_quartz_log where create_time < DATE_SUB(NOW(), INTERVAL 1 MONTH) LIMIT 10000 ", nativeQuery = true)
@Query(value = "delete from sys_quartz_log where log_id in (SELECT log_id FROM (SELECT log_id FROM sys_quartz_log WHERE create_time < DATE_SUB(NOW(),INTERVAL 1 MONTH) LIMIT 10000) tmp) ", nativeQuery = true)
void cleanQuartzLog();
}