chore: update

This commit is contained in:
2024-09-03 12:32:56 +08:00
parent bceefe1d41
commit 3a0dee8755
6 files changed
+142 -89

No files matched your search

@@ -68,12 +68,13 @@ class SignManager {
return getRecord(id)
}
suspend fun redeemItem(id: Long, itemPrice: Int) {
suspend fun redeemItem(id: Long, itemPrice: Int): JrrpRecord? {
val current = getRecord(id)
suspendedTransaction {
SignTable.update({ userId eq id }) {
it[point] = current?.points!! - itemPrice
}
}
return getRecord(id)
}
}