Commit 9dd80b7b authored by hujun's avatar hujun

auth

parent acf2ae6e
......@@ -114,12 +114,18 @@ class Location extends Basic
}
$where['agent_id'] = $agent_id;
$agent_data = $s_redis->getRedisCache(2, $this->agentId);
$is_ = $s_redis->checkRule($this->agentId, 'location_district'); //全公司的
$is_ = $s_redis->checkRule($this->agentId, 'location_all'); //全公司的
if ($is_) {
$where['district_id'] = $agent_data['district_id']; //本部门
$is_ = $s_redis->checkRule($this->agentId, 'location_store'); //全门店
$is_ = $s_redis->checkRule($this->agentId, 'location_district'); //全部门
if ($is_) {
$where['store_id'] = $agent_data['store_id']; //本门店
$is_ = $s_redis->checkRule($this->agentId, 'location_store'); //全门店
if ($is_) {
$where['agent_id'] = $this->agentId; //默认查询自己
} else {
$where['store_id'] = $agent_data['store_id']; //本门店
}
} else {
$where['district_id'] = $agent_data['district_id']; //本部门
}
}
break;
......
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