diff --git a/application/cron/controller/Subsidy.php b/application/cron/controller/Subsidy.php index 00e44dc..8f232b0 100644 --- a/application/cron/controller/Subsidy.php +++ b/application/cron/controller/Subsidy.php @@ -30,12 +30,13 @@ class Subsidy */ public function createGuildSubsidyData(){ //获取上周第一天时间 - $week_start_time = strtotime('-1 weeklast monday'); - $week_end_time = strtotime('last sunday'); -// $week_start_time = strtotime('this week monday'); -// $week_end_time = strtotime('sunday'); + $week_start_time = strtotime('last monday'); + $week_end_time = strtotime(date('Y-m-d 23:59:59',strtotime('last sunday'))); + // $week_start_time = strtotime('2025-08-11'); + // $week_end_time = strtotime('2025-08-17 23:59:59'); + //获取上周时间 - $time_value = date('o-W', strtotime('-1 week')); + $time_value = date('o-W', $week_start_time); echo $time_value . "工会周补贴数据生成开始\n"; //查询所有工会 $guild_list = db::name('vs_guild')->where(['delete_time'=>0])->field('id')->select(); @@ -97,12 +98,13 @@ class Subsidy */ public function createRoomSubsidyData(){ //获取上周第一天时间 - $week_start_time = strtotime('-1 weeklast monday'); - $week_end_time = strtotime('last sunday'); -// $week_start_time = strtotime('this week monday'); -// $week_end_time = strtotime('sunday'); + $week_start_time = strtotime('last monday'); + $week_end_time = strtotime(date('Y-m-d 23:59:59',strtotime('last sunday'))); + // $week_start_time = strtotime('2025-08-11'); + // $week_end_time = strtotime('2025-08-17 23:59:59'); + //获取上周时间 - $time_value = date('o-W', strtotime('-1 week')); + $time_value = date('o-W', $week_start_time); echo $time_value . "房间周补贴数据生成开始\n"; //查询所有房间 $room_list = db::name('vs_room')->where(['delete_time'=>0,'is_earnings'=>1])->field('id')->select();