From 58f2a4fa7e166c1c078c1c75d7d21789af861c69 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Wed, 16 Aug 2023 11:09:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9F=A5=E8=AF=A2=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/dao/community/CommunityDao.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/dao/community/CommunityDao.php b/app/common/dao/community/CommunityDao.php index 16631cb0..577b233b 100644 --- a/app/common/dao/community/CommunityDao.php +++ b/app/common/dao/community/CommunityDao.php @@ -38,7 +38,7 @@ class CommunityDao extends BaseDao ->when(isset($where['keyword']) && $where['keyword'] !== '', function ($query) use($where) { $query->whereLike('Community.title',"%{$where['keyword']}%"); }) - ->when(isset($where['resale_type']) && $where['resale_type'] !== '', function ($query) use($where) { + ->when(!empty($where['resale_type']), function ($query) use($where) { $query->where('Community.resale_type', $where['resale_type']); }) ->when(isset($where['uid']) && $where['uid'] !== '', function ($query) use($where) {