我有下面的代碼片段斯卡拉Playframework消除未來,併爲其分配
val prerequisiteFuture = processStepPrerequisitesDTO.getProcessStepPrerequisiteProcessTemplateIds(step.id.get)
prerequisiteFuture.map(prereqTemplates => {
processTemplateDTO.getProcessTemplates(prereqTemplates).map(pres => {
step.stepPrerequisites = Some(pres)
step.prerequisites = processStepPrerequisitesDTO.getProcessStepPrerequisitesByProcessTemplateId(step.id.get).map(preReqs => {
preReqs
})
step
})
})
found : scala.concurrent.Future[Seq[models.ProcessStepPrerequisitesModel]]*
[error] required: Option[Seq[models.ProcessStepPrerequisitesModel]]
我怎樣才能刪除未來?謝謝
什麼是processTemplateDTO.getProcessTemplates的(..)的類型? – Nyavro
類型是'未來[Seq [ProcessStepPrerequisitesModel]]' – Felix