[O] Mai2 set isCurrent = false for userLoginBonus on saving to enable select login bonus every time

pull/119/head
Clansty 2025-02-26 04:08:34 +08:00
parent b840f6709b
commit 122a6776a2
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
1 changed files with 3 additions and 1 deletions

View File

@ -95,7 +95,9 @@ class UpsertUserAllHandler(
req.userLoginBonusList?.unique { it.bonusId }?.let { news ->
repos.userLoginBonus.saveAll(news.mapApply {
id = repos.userLoginBonus.findByUserAndBonusId(u, bonusId)()?.id ?: 0 }) }
id = repos.userLoginBonus.findByUserAndBonusId(u, bonusId)()?.id ?: 0
isCurrent = false
}) }
req.userRatingList?.getOrNull(0)?.let { r ->
repos.userUdemae.saveAndFlush(r.udemae.apply {