move card issuence server side

This commit is contained in:
androidlover5842
2026-01-24 23:53:03 +05:30
parent ab7f02ddc6
commit 094673b475
7 changed files with 553 additions and 95 deletions

View File

@@ -0,0 +1,17 @@
package com.android.trisolarisserver.repo
import com.android.trisolarisserver.models.room.PropertyCardCounter
import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.Lock
import org.springframework.data.jpa.repository.Query
import org.springframework.data.repository.query.Param
import java.util.UUID
import jakarta.persistence.LockModeType
interface PropertyCardCounterRepo : JpaRepository<PropertyCardCounter, UUID> {
fun findByPropertyId(propertyId: UUID): PropertyCardCounter?
@Lock(LockModeType.PESSIMISTIC_WRITE)
@Query("select c from PropertyCardCounter c where c.property.id = :propertyId")
fun findByPropertyIdForUpdate(@Param("propertyId") propertyId: UUID): PropertyCardCounter?
}