request->input('chef_id'); $chef = $this->chefModel ->leftJoin('admin_user', 'admin_user.id', '=', 'chef.user_id') ->where('chef.user_id', $chefId) ->select([ 'admin_user.id', 'admin_user.username', 'admin_user.avatar', 'admin_user.chinese_name', 'chef.profile', 'chef.specialties', ]) ->first(); if (empty($chef)) throw new ErrException('厨师不存在'); $avatarUrl = $this->getOssObjectById($chef->avatar); $res = $chef->toArray(); $res['avatar_url'] = $avatarUrl; // todo 评价补全 return $this->return->success('success', $res); } }