fix(analysis): page number was not persisted

closes #189
This commit is contained in:
Gauthier Roebroeck 2020-06-08 08:38:01 +08:00
parent dbfb3391dc
commit 99f800ce8f

View File

@ -68,11 +68,12 @@ class MediaDao(
}
private fun insertPages(dsl: DSLContext, media: Media) {
media.pages.forEach {
media.pages.forEachIndexed { index, page ->
dsl.insertInto(p)
.set(p.BOOK_ID, media.bookId)
.set(p.FILE_NAME, it.fileName)
.set(p.MEDIA_TYPE, it.mediaType)
.set(p.FILE_NAME, page.fileName)
.set(p.MEDIA_TYPE, page.mediaType)
.set(p.NUMBER, index)
.execute()
}
}