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

This commit is contained in:
Clansty
2025-02-26 04:08:34 +08:00
parent b840f6709b
commit 122a6776a2

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 {