Commit e823ca26 authored by hujun's avatar hujun

总监权限查看

parent 11466d0d
......@@ -46,13 +46,13 @@ class ApplyForCost extends Basic
$get_check_user = 'index/getCostListOne/0';
$is_check = $this->checkAuth($get_check_user);
if ($is_check) {
$where['a.store_id'] = $agent_data['store_id'];
} else {
$m_agent = new AAgents();
$district_id = $m_agent->getAgentsByWhereColumn(['phone'=>$this->agentPhone], 'district_id');
if ($district_id) {
$where['b.district_id'] = ['in', $district_id]; //总监多个账号查看
}
} else {
$where['a.store_id'] = $agent_data['store_id'];
}
break;
case 2 :
......@@ -63,19 +63,19 @@ class ApplyForCost extends Basic
$get_check_user = 'index/getCostListTwo/1';
$is_check = $this->checkAuth($get_check_user);
if ($is_check) {
if (!$is_check) {
$get_check_user = 'index/getCostListOne/0';
$is_check = $this->checkAuth($get_check_user);
if ($is_check) {
$where['a.store_id'] = $agent_data['store_id']; //店长查看
} else {
$m_agent = new AAgents();
$district_id = $m_agent->getAgentsByWhereColumn(['phone'=>$this->agentPhone], 'district_id');
if ($district_id) {
$district_id[] = $agent_data['district_id'];
$where['b.district_id'] = ['in', $district_id]; //总监多个账号查看
}
} else {
$where['a.store_id'] = $agent_data['store_id']; //店长查看
}
}
//财务一审查看
......
......@@ -433,7 +433,6 @@ class RedisCacheService
$rules_arr = explode(',', $rules);
$result = 1;
big_log(json_encode($rules_arr), 'check_rule');
if (in_array($auth_rule_id, $rules_arr)) {
$result = 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