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'), ];