setter
parent
4ea5b959b3
commit
3c2ab4fe85
|
@ -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'];
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue