Commit 23213e02 authored by hujun's avatar hujun

特殊权限处理

parent 88d7150c
......@@ -248,9 +248,9 @@ class Basic extends Controller
if (empty($this->params['id'])) {
$is_auth = 1;
} else {
$where['houses_id'] = $this->params['id'];
$where['house_id'] = $this->params['id'];
$where['type'] = 2;
$where['agents_id'] = $this->userId;
$where['agent_id'] = $this->userId;
$where['is_del'] = 0;
$is_ = $agent_house->getTotal($where);
$is_auth = $is_ > 0 ? 1:0;
......@@ -258,7 +258,7 @@ class Basic extends Controller
//处理店长权限
if (!$is_auth) {
$where_agent['a.houses_id'] = $this->params['id'];
$where_agent['a.house_id'] = $this->params['id'];
$where_agent['a.type'] = 2;
$where_agent['a.is_del'] = 0;
$store_id_arr = $agent_house->getAgentsByRoomColumn('b.store_id', $where_agent);
......@@ -275,17 +275,17 @@ class Basic extends Controller
}
//有VIP盘权限处理
if (!$is_auth) {
$m_house = new OfficeGRoom();
$is_vip = $m_house->getFieldOneValue('is_vip', ['id'=>$this->params['id']]);
if ($is_vip) {
$check_auth = new VipService();
$check_rule = $check_auth->checkRule($this->userId, 'office_index/vipHouse');
if (!$check_rule) {
$is_auth = 1;
}
}
}
// if (!$is_auth) {
// $m_house = new OfficeGRoom();
// $is_vip = $m_house->getFieldOneValue('is_vip', ['id'=>$this->params['id']]);
// if ($is_vip) {
// $check_auth = new VipService();
// $check_rule = $check_auth->checkRule($this->userId, 'office_index/vipHouse');
// if (!$check_rule) {
// $is_auth = 1;
// }
// }
// }
}
//处理客方编辑、跟进、公客客户
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment