From 90032fe04ce7d53d36788ae0a9c61b54e10d5ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AF=9B=E7=BA=BF?= <13816653+maoxian-1@users.noreply.github.com> Date: Tue, 2 Sep 2025 09:17:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DSUM=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E7=B2=BE=E5=BA=A6=E4=B8=A2=E5=A4=B1=E5=87=BA?= =?UTF-8?q?=E7=8E=B0.00000000xxx=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/functions.php b/include/functions.php index 96be416a..30086739 100644 --- a/include/functions.php +++ b/include/functions.php @@ -6039,7 +6039,7 @@ function calculate_seed_bonus($uid, $torrentIdArr = null): array $officialAdditionalFactor = \App\Models\Setting::get('bonus.official_addition'); $zeroBonusTag = \App\Models\Setting::get('bonus.zero_bonus_tag'); $zeroBonusFactor = \App\Models\Setting::get('bonus.zero_bonus_factor'); - $userMedalResult = \Nexus\Database\NexusDB::select("select sum(bonus_addition_factor) as factor from medals where id in (select medal_id from user_medals where uid = $uid and (expire_at is null or expire_at > '$nowStr') and (bonus_addition_expire_at is null or bonus_addition_expire_at > '$nowStr'))"); + $userMedalResult = \Nexus\Database\NexusDB::select("select round(sum(bonus_addition_factor), 5) as factor from medals where id in (select medal_id from user_medals where uid = $uid and (expire_at is null or expire_at > '$nowStr') and (bonus_addition_expire_at is null or bonus_addition_expire_at > '$nowStr'))"); $medalAdditionalFactor = floatval($userMedalResult[0]['factor'] ?? 0); do_log("$logPrefix, sql: $sql, count: " . count($torrentResult) . ", officialTag: $officialTag, officialAdditionalFactor: $officialAdditionalFactor, zeroBonusTag: $zeroBonusTag, zeroBonusFactor: $zeroBonusFactor, medalAdditionalFactor: $medalAdditionalFactor"); $last_action = "";