mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 12:30:49 +08:00
mybonus.php remove medal
This commit is contained in:
@@ -55,6 +55,9 @@ class BonusRepository extends BaseRepository
|
||||
if ($exists) {
|
||||
throw new \LogicException("user: $uid already own this medal: $medalId.");
|
||||
}
|
||||
if ($medal->get_type != Medal::GET_TYPE_EXCHANGE) {
|
||||
throw new \LogicException("This medal can not be buy.");
|
||||
}
|
||||
$requireBonus = $medal->price;
|
||||
NexusDB::transaction(function () use ($user, $medal, $requireBonus) {
|
||||
$comment = nexus_trans('bonus.comment_buy_medal', [
|
||||
|
||||
Reference in New Issue
Block a user