diff --git a/app/common/dao/community/CommunityDao.php b/app/common/dao/community/CommunityDao.php index 1590eed8..23ca764d 100644 --- a/app/common/dao/community/CommunityDao.php +++ b/app/common/dao/community/CommunityDao.php @@ -31,8 +31,8 @@ class CommunityDao extends BaseDao { $query = Community::hasWhere('author', function($query) use ($where){ $query->when(isset($where['username']) && $where['username'] !== '', function ($query) use($where) { - $merId = Db::name('merchant')->where('mer_name', $where['username'])->value('mer_id', -1); - $query->where('uid', $merId); + $uid = Db::name('merchant')->where('mer_name', $where['username'])->value('uid', -1); + $query->where('uid', $uid); }); $query->where(true); });