房间补贴修改。

This commit is contained in:
2026-01-19 10:57:02 +08:00
parent b2d1106e0b
commit 556c42cc72
2 changed files with 44 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
namespace app\cron\controller;
use app\common\controller\adminApi;
use app\common\library\GiftTableManager;
use think\Controller;
use think\Db;
@@ -63,11 +64,31 @@ class Subsidy
// if($v['quit_time'] && ($week_end_time_seach > $v['quit_time'])){
// $week_end_time_seach = $v['quit_time'];
// }
// $transaction_one = db::name('vs_give_gift')
// ->whereIn('from_id',$v['room_id'])
// ->where(['from'=>['in',[2,3,6]],'createtime' => ['between', [$week_start_time_seach, $week_end_time_seach]]])
// ->sum('total_price');
// $tables = GiftTableManager::getTablesByTimeRange(
// $week_start_time_seach,
// $week_end_time_seach
// );
// $all_total_price =0;
// if($tables){
// foreach ($tables as $table_name){
// //表前缀
// $table_prefix = config('database.prefix');
// $table_name = str_replace($table_prefix, '', $table_name);
// $total_price = db::name($table_name)
// ->whereIn('from_id',$v['room_id'])
// ->where(['from'=>['in',[2,3,6]],'createtime' => ['between', [$week_start_time_seach, $week_end_time_seach]]])
// ->sum('total_price');
// $all_total_price += $total_price;
// }
// }
// $transaction_one = $all_total_price;
// $transaction += $transaction_one;
//
//// $transaction_one = db::name('vs_give_gift')
//// ->whereIn('from_id',$v['room_id'])
//// ->where(['from'=>['in',[2,3,6]],'createtime' => ['between', [$week_start_time_seach, $week_end_time_seach]]])
//// ->sum('total_price');
//// $transaction += $transaction_one;
// }
//
// if($transaction > 0){