测试:bug处理

This commit is contained in:
2026-01-13 15:47:19 +08:00
parent a6ac190358
commit 4d528e0e72
3 changed files with 25 additions and 4 deletions

View File

@@ -3,6 +3,7 @@
namespace app\adminapi\controller;
ini_set('memory_limit', '512M'); // 临时增加到512MB
use app\common\controller\adminApi;
use app\common\library\GiftTableManager;
use think\Db;
use think\Log;
@@ -103,9 +104,17 @@ class GiveGift extends adminApi
// $count = db::name('vs_give_gift')->where($where)->count();
$earning_list = [];
if(!empty($where)){
$tables = GiftTableManager::getTablesByTimeRange(
strtotime($start_time),
strtotime($end_time)
);
if(empty($tables)){
$tables[0] = "fa_vs_give_gift";
}
$table_name = substr($tables[0], 3);//截取可查询的表名
$earning_list = db::name('vs_give_gift_ratio_log')
->alias('egl')
->join('vs_give_gift gg', 'egl.give_gift_id = gg.id')
->join($table_name.' gg', 'egl.give_gift_id = gg.id')
->where($gwhere) // 替换为实际的筛选条件
->field('egl.app_earning,egl.gift_user_earning,egl.room_owner_earning')
->select();