From 58fd97511eb5709b7f86fcd87e8a9a613b692ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Mon, 25 Aug 2025 11:25:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E8=B4=B4=E8=84=9A=E6=9C=AC=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=87=8D=E6=96=B0=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/cron/controller/Subsidy.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) 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();