Commit 0c43609b authored by hujun's avatar hujun

店长编辑商铺权限

parent 05a2cf03
......@@ -164,9 +164,28 @@ class Basic extends Controller
$where['houses_id'] = $this->params['id'];
$where['type'] = 2;
$where['agents_id'] = $this->userId;
$where['is_del'] = 0;
$is_ = $agent->getTotal($where);
$is_auth = $is_ > 0 ? 1:0;
}
//处理店长权限
if (!$is_auth) {
$agent = new GHousesToAgents();
$where['houses_id'] = $this->params['id'];
$where['type'] = 2;
$where['is_del'] = 0;
$store_id_arr = $agent->getAgentHouseOne('store_id', $where);
if (!empty($store_id_arr)) {
$store_id = implode(',', array_unique($store_id_arr));
}
if (!empty($store_id)) {
$is_ = $agent->getTotal(['store_id'=>$store_id, 'id'=>$this->userId, 'level'=>20]);
$is_auth = $is_ > 0 ? 1:0;
}
}
}
//处理客方编辑、跟进、公客客户
......
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