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) {