no message
parent
ab57324968
commit
327840c4e1
|
|
@ -41,7 +41,6 @@ public interface LogRepository extends JpaRepository<Log, Long>, JpaSpecificatio
|
|||
|
||||
/**
|
||||
* 归档的数据,保存到sys_log_bk表中,保留1个月
|
||||
*
|
||||
*/
|
||||
@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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue