From 862e4a208079f7c3d22231b4a451583b97d2da79 Mon Sep 17 00:00:00 2001 From: yanzai Date: Tue, 29 Jul 2025 22:19:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E4=BD=93=E6=A3=80=E6=8E=A8?= =?UTF-8?q?=E9=80=81=EF=BC=8C=E4=B8=8A=E4=B8=8B=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Laravel/app/Http/Controllers/API/H5/ComboController.php | 6 ++++++ Laravel/app/Services/ComboItemGroupService.php | 2 ++ 2 files changed, 8 insertions(+) diff --git a/Laravel/app/Http/Controllers/API/H5/ComboController.php b/Laravel/app/Http/Controllers/API/H5/ComboController.php index c13e61b..ac154fe 100644 --- a/Laravel/app/Http/Controllers/API/H5/ComboController.php +++ b/Laravel/app/Http/Controllers/API/H5/ComboController.php @@ -186,7 +186,13 @@ class ComboController extends Controller select combo_id as c_id,count(*) as count from combo_items where status in(1) and keshi_name<>'材料费' group by combo_id ) as b on a.combo_id=b.c_id where a.status=1 " . $sql ." ", $canshu); $combos_list=[]; + $nowdatetime=date('Y-m-d H:i:s'); foreach ($combos as $key => $combo) { + if(isset($combo->youxiao_end_time) and isset($combo->youxiao_start_time)){ + if($nowdatetime>$combo->youxiao_end_time or $nowdatetime<$combo->youxiao_start_time){ + continue; + } + } if(json_decode($combo->beizhu, JSON_UNESCAPED_UNICODE)){ $beizhu=json_decode($combo->beizhu, JSON_UNESCAPED_UNICODE); if(isset($beizhu['可用渠道']) and !empty($beizhu['可用渠道'])){ diff --git a/Laravel/app/Services/ComboItemGroupService.php b/Laravel/app/Services/ComboItemGroupService.php index 6a71b5d..b413f3e 100644 --- a/Laravel/app/Services/ComboItemGroupService.php +++ b/Laravel/app/Services/ComboItemGroupService.php @@ -105,6 +105,8 @@ class ComboItemGroupService 'duo_xuan_yi'=>json_encode($combo['包含多选一组'], JSON_UNESCAPED_UNICODE), 'keyue_start_time' => $combo['可约开始时间'], 'keyue_end_time' => $combo['可约截止时间'], + 'youxiao_start_time' => $combo['有效开始日期'], + 'youxiao_end_time' => $combo['有效截止日期'], 'status' => 1, 'updated_at' => date('Y-m-d H:i:s'), ];