mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-11 07:07:27 +08:00
[F] Fix delete transaction
This commit is contained in:
@@ -2,6 +2,7 @@ package icu.samnyan.aqua.sega.allnet
|
|||||||
|
|
||||||
import icu.samnyan.aqua.net.db.AquaNetUser
|
import icu.samnyan.aqua.net.db.AquaNetUser
|
||||||
import jakarta.persistence.*
|
import jakarta.persistence.*
|
||||||
|
import jakarta.transaction.Transactional
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import org.springframework.data.jpa.repository.JpaRepository
|
import org.springframework.data.jpa.repository.JpaRepository
|
||||||
import org.springframework.scheduling.annotation.Scheduled
|
import org.springframework.scheduling.annotation.Scheduled
|
||||||
@@ -42,6 +43,8 @@ fun genUrlSafeToken(length: Int): String {
|
|||||||
@Repository("KeychipSessionRepo")
|
@Repository("KeychipSessionRepo")
|
||||||
interface KeychipSessionRepo : JpaRepository<KeychipSession, String> {
|
interface KeychipSessionRepo : JpaRepository<KeychipSession, String> {
|
||||||
fun findByToken(token: String): KeychipSession?
|
fun findByToken(token: String): KeychipSession?
|
||||||
|
|
||||||
|
@Transactional
|
||||||
fun deleteAllByLastUseBefore(expire: Long)
|
fun deleteAllByLastUseBefore(expire: Long)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user