指定字段:$historyinfo = Healthy::find()->select(['healthy_id','pet_name','hardware_name','hardware_color','remove_binding'])->where(['user_id'=>$user_id,'is_activation'=>'2'])->asArray()->all();获取添加数据的id: $id = $model->attributes['healthy_id'];