swip bonus consume

This commit is contained in:
xiaomlove
2022-07-25 03:37:51 +08:00
parent cc63bb53e6
commit c43ded9369
2 changed files with 0 additions and 5 deletions

View File

@@ -31,7 +31,6 @@ class BonusRepository extends BaseRepository
$comment = nexus_trans('hr.bonus_cancel_comment', [
'bonus' => $requireBonus,
], $user->locale);
$comment = addslashes($comment);
do_log("comment: $comment");
$this->consumeUserBonus($user, $requireBonus, BonusLogs::BUSINESS_TYPE_CANCEL_HIT_AND_RUN, "$comment(H&R ID: {$hitAndRun->id})");
@@ -62,7 +61,6 @@ class BonusRepository extends BaseRepository
'bonus' => $requireBonus,
'medal_name' => $medal->name,
], $user->locale);
$comment = addslashes($comment);
do_log("comment: $comment");
$this->consumeUserBonus($user, $requireBonus, BonusLogs::BUSINESS_TYPE_BUY_MEDAL, "$comment(medal ID: {$medal->id})");
$expireAt = null;
@@ -85,7 +83,6 @@ class BonusRepository extends BaseRepository
$comment = nexus_trans('bonus.comment_buy_attendance_card', [
'bonus' => $requireBonus,
], $user->locale);
$comment = addslashes($comment);
do_log("comment: $comment");
$this->consumeUserBonus($user, $requireBonus, BonusLogs::BUSINESS_TYPE_BUY_ATTENDANCE_CARD, $comment);
User::query()->where('id', $user->id)->increment('attendance_card');

View File

@@ -658,7 +658,6 @@ if ($action == "exchange") {
stderr("Error","Invalid Medal ID: " . ($_POST['medal_id'] ?? ''), false, false);
}
try {
$bonusRep = new \App\Repositories\BonusRepository();
$bonusRep->consumeToBuyMedal($userid, $_POST['medal_id']);
nexus_redirect("" . get_protocol_prefix() . "$BASEURL/mybonus.php?do=buy_medal");
} catch (\Exception $exception) {
@@ -667,7 +666,6 @@ if ($action == "exchange") {
}
} elseif ($art == 'attendance_card') {
try {
$bonusRep = new \App\Repositories\BonusRepository();
$bonusRep->consumeToBuyAttendanceCard($userid);
nexus_redirect("" . get_protocol_prefix() . "$BASEURL/mybonus.php?do=attendance_card");
} catch (\Exception $exception) {