Handle duplicate cardId on revoke
Some checks failed
build-and-deploy / build-deploy (push) Has been cancelled

This commit is contained in:
androidlover5842
2026-01-28 18:20:49 +05:30
parent 8c69a18e75
commit f082328abe
2 changed files with 3 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ interface IssuedCardRepo : JpaRepository<IssuedCard, UUID> {
fun findByRoomStayIdOrderByIssuedAtDesc(roomStayId: UUID): List<IssuedCard>
fun findByIdAndPropertyId(id: UUID, propertyId: UUID): IssuedCard?
fun findByCardIdIgnoreCaseAndPropertyId(cardId: String, propertyId: UUID): IssuedCard?
fun findAllByCardIdIgnoreCaseAndPropertyId(cardId: String, propertyId: UUID): List<IssuedCard>
@org.springframework.data.jpa.repository.Query("""
select case when count(c) > 0 then true else false end