diff --git a/app/controller/manager/Business.php b/app/controller/manager/Business.php index 365e751..dee6c67 100644 --- a/app/controller/manager/Business.php +++ b/app/controller/manager/Business.php @@ -40,7 +40,8 @@ class Business extends Base $size = $this->request->param('size/d', 30); $whereMap = [ - ["a.state", "=", BusinessModel::state_on] + ["a.state", "=", BusinessModel::state_on], + ["b.type", "=", Account::type_business] ]; $orders = ['a.id' => 'desc']; if (!empty($keyword)) { @@ -265,10 +266,12 @@ class Business extends Base - $whereMap = [["a.state", "in", [BusinessModel::state_reviewing, BusinessModel::state_off]]]; + $whereMap = [ + ["a.state", "in", [BusinessModel::state_reviewing, BusinessModel::state_off]], + ["b.type", "=", Account::type_consumer] + ]; //如果是渠道商或者工作人员 只查看自己的下级商家 if(Member::is_agency($this->auth['roles'])){ - $whereMap[] = ['a.agency_code', '=', $this->auth['business_code']]; } $orders = ['a.id' => 'desc']; diff --git a/app/repository/BusinessRepository.php b/app/repository/BusinessRepository.php index 80c70b8..b45a873 100644 --- a/app/repository/BusinessRepository.php +++ b/app/repository/BusinessRepository.php @@ -42,7 +42,6 @@ class BusinessRepository extends Repository { $q = $this->model->alias("a") ->join("account b", "a.code = b.business_code") - ->where("b.type","=",Account::type_consumer) ->field(["a.code as business_code", "b.avatar_url", "b.nick_name as account_nick_name",