forked from Cookies_Github_mirror/AquaDX
[+] mai2 artemis import script
This commit is contained in:
@@ -1,19 +1,15 @@
|
||||
package icu.samnyan.aqua.net.games
|
||||
|
||||
import ext.*
|
||||
import icu.samnyan.aqua.net.db.AquaUserServices
|
||||
import icu.samnyan.aqua.net.utils.*
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.UserData
|
||||
import icu.samnyan.aqua.sega.general.model.Card
|
||||
import kotlinx.serialization.Serializable
|
||||
import org.springframework.context.annotation.Import
|
||||
import org.springframework.data.domain.Page
|
||||
import org.springframework.data.domain.Pageable
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
import org.springframework.data.jpa.repository.Query
|
||||
import org.springframework.data.repository.NoRepositoryBean
|
||||
import java.util.*
|
||||
import kotlin.jvm.optionals.getOrNull
|
||||
import kotlin.reflect.KClass
|
||||
import kotlin.system.measureTimeMillis
|
||||
|
||||
data class TrendOut(val date: String, val rating: Int, val plays: Int)
|
||||
|
||||
@@ -114,4 +110,13 @@ interface GenericUserDataRepo<T : IGenericUserData> : JpaRepository<T, Long> {
|
||||
interface GenericPlaylogRepo<T: IGenericGamePlaylog> : JpaRepository<T, Long> {
|
||||
fun findByUserCardExtId(extId: Long): List<T>
|
||||
fun findByUserCardExtId(extId: Long, page: Pageable): Page<T>
|
||||
}
|
||||
|
||||
data class ImportResult(val errors: List<String>, val warnings: List<String>, val json: String)
|
||||
|
||||
interface GameDataImport {
|
||||
/**
|
||||
* Read an artemis SQL dump file and return Aqua JSON
|
||||
*/
|
||||
fun importArtemisSql(sql: String): ImportResult
|
||||
}
|
||||
Reference in New Issue
Block a user