['except' => []] ]; public function index() { $this->checkAuth(); $uid = JWT_UID; $userInfo = Db::name('Admin')->where(['id' => $uid])->field(['id', 'username', 'name', 'email', 'mobile', 'sex', 'nickname', 'thumb', 'did', 'position_id', 'desc', 'entry_time'])->find(); $department = $userInfo['did']; $map1 = []; $map2 = []; $map1[] = ['status', '=', 1]; $map1[] = ['department_ids', '=', '']; $map2[] = ['status', '=', 1]; $map2[] = ['', 'exp', Db::raw("FIND_IN_SET('{$department}',department_ids)")]; $list = Db::name('FlowType')->whereOr([$map1,$map2])->fetchSql(false)->select()->toArray(); $this->apiSuccess('获取成功', $list); } }