排行榜

This commit is contained in:
2026-01-09 18:24:44 +08:00
parent d8a299e4a2
commit fbfc0975dd

View File

@@ -540,18 +540,15 @@ class GiveGiftBase extends Model
FROM ({$unionSql}) as tmp
GROUP BY {$options['group_by']}
ORDER BY total_price";
var_dump(121212121);
} else {
$finalSql = "SELECT SUM(total_number) as total_number,
SUM(total_price) as total_price,
SUM(total_count) as total_count
FROM ({$unionSql}) as tmp";
}
var_dump($finalSql);
var_dump($params);
try {
$result = Db::query($finalSql, $params);
return $options['group_by'] ? $result : ($result[0] ?? []);
} catch (\Exception $e) {
Log::error("统计送礼数据失败: " . $e->getMessage());