优化:Give_Gift 表查询处理

This commit is contained in:
2026-01-12 19:56:04 +08:00
parent aaa1837502
commit f45b60c9d3
2 changed files with 6 additions and 1 deletions

View File

@@ -130,6 +130,9 @@ class Statistical extends adminApi
strtotime($begin_time),
strtotime($end_time)
);
if(empty($tables)){
$tables = "vs_give_gift";
}
$table_name = substr($tables[0], 3);//截取可查询的表名
$count = db::name($table_name)

View File

@@ -94,7 +94,9 @@ class Gift extends Model
);
//数组排序fa_vs_give_gift_202601 表明数字大的排在前面
arsort($tables);
if(empty($tables)){
$tables[0] = "vs_give_gift";
}
$gift_count = 0;
$gift_total_price = 0;
$gift_number = 0;