[RF] move userMusicFromList to GameApiController and add GenericUserMusicRepo

This commit is contained in:
Clansty
2025-01-05 19:54:15 +08:00
parent 7083e1a117
commit ccd88a10ab
14 changed files with 42 additions and 18 deletions

View File

@@ -107,6 +107,10 @@ interface IGenericGamePlaylog {
val isAllPerfect: Boolean
}
interface IGenericUserMusic {
val musicId: Int
}
@MappedSuperclass
open class BaseEntity(
@Id
@@ -132,4 +136,10 @@ interface GenericPlaylogRepo<T: IGenericGamePlaylog> : JpaRepository<T, Long> {
fun findByUserCardExtId(extId: Long, page: Pageable): Page<T>
}
@NoRepositoryBean
interface GenericUserMusicRepo<T: IGenericUserMusic> : JpaRepository<T, Long> {
fun findByUserCardExtId(extId: Long): List<T>
fun findByUser_Card_ExtIdAndMusicIdIn(userId: Long, musicId: List<Int>): List<T>
}
data class ImportResult(val errors: List<String>, val warnings: List<String>, val json: String)