排行榜

This commit is contained in:
2026-01-09 18:01:43 +08:00
parent 280d4be22b
commit 40879dd516
2 changed files with 3 additions and 6 deletions

View File

@@ -357,13 +357,13 @@ class GiveGiftBases extends Model
{
$where = [];
$options = [];
var_dump($params);
// 时间范围
if (!empty($params['start_time'])) {
$options['start_time'] = strtotime($params['start_time']);
$options['start_time'] = $params['start_time'];
}
if (!empty($params['end_time'])) {
$options['end_time'] = strtotime($params['end_time']);
$options['end_time'] = $params['end_time'];
}

View File

@@ -470,7 +470,6 @@ class GiveGiftBase extends Model
*/
public function getGiftStatisticsRanking($where = [], $options = [])
{
$defaultOptions = [
'group_by' => null, // 分组字段
'start_time' => null,
@@ -478,7 +477,6 @@ class GiveGiftBase extends Model
];
$options = array_merge($defaultOptions, $options);
var_dump(111);
// 获取需要查询的表
$tables = GiftTableManager::getTablesByTimeRange(
@@ -535,7 +533,6 @@ class GiveGiftBase extends Model
$unionSql .= "(" . $sql . ")";
}
var_dump($unionSql);exit;
// 最终统计
if ($options['group_by']) {
$finalSql = "SELECT {$options['group_by']},