User::find()->where(['in','id',$fids])->orderBy(["FIELD(id, ".join(',',$uids).")" => true])->all();

相关文章: