Commit 8b1fb6d0 authored by hujun's avatar hujun

恢复代码

parent 53c02048
...@@ -399,4 +399,23 @@ class AAgents extends BaseModel ...@@ -399,4 +399,23 @@ class AAgents extends BaseModel
return $result; return $result;
} }
/**
* 检查是否有权限
*
* @param $id
* @param $agents_id
* @return array|false|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function agentsAuth($id, $agents_id) {
return $this->alias('a')
->field('b.id')
->join('auth_group b','a.auth_group_id=b.id','left')
->where("FIND_IN_SET({$id},b.rules)")
->where('a.id',$agents_id)
->where('b.status',0)
->find();
}
} }
\ No newline at end of file
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