From f8498638ad8992228620659d9bbc87ff0a5919bb Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Tue, 10 Dec 2019 16:40:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=85=85=E5=80=BC=E8=A1=8C?= =?UTF-8?q?=E4=B8=BA=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/BehaviorLogController.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index 1ceafba57..ec5612d45 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -46,12 +46,15 @@ class BehaviorLogController extends ThinkController $startTime = strtotime($startDate); $endTime = strtotime($endDate) + 86399; $map['create_time'] = array('BETWEEN', [$startTime, $endTime]); - if (I('promote_id')) { + if ($promoteId = I('promote_id')) { if ($promoteId == 0) { $map['promote_id'] = 0; } else { $promoteMap['chain'] = ['like', "%/$promoteId/%"]; $promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true); + if(empty($promoteIds)) { + $promoteIds[] = $promoteIds; + } $map['promote_id'] = ['in', $promoteIds]; } }