}
}
- def updateState(id: Long, partId: Long, designChangeId: Long, notifyType: Long, state: Long) = Action {
+ def updateState(id: Long, partId: Long, designChangeId: Long, notifyType: Long, state: Long) = Action { implicit request =>
inTransaction {
val notify = NotifyManager().getById(id)
notify.state = 1
var i:Int =0
notifyBuffer += NotifyBean(i, notify.message, notify.user.head.name, notify.id, Messages("notify.state" + notify.state), notify.atachs)
for(reply <- notify.replies) {
- ReplyRecursion().down(reply, notifyBuffer, i)
+// ReplyRecursion().down(reply, notifyBuffer, i)
+ for(returnNotifyBuffer <- ReplyRecursion().down(reply, i)) {
+ notifyBuffer += returnNotifyBuffer
+ }
}
}
Ok(views.html.notifylist(notifyBuffer.drop(page*row).take(row), notifyBuffer.size, partId, 0, notifyPart.name, page, notifyType, state))
var i:Int =0
notifyBuffer += NotifyBean(i, notify.message, notify.user.assign(notify.user.head).name, notify.id, Messages("notify.state" + notify.state), notify.atachs)
for(reply <- notify.replies) {
- ReplyRecursion().down(reply, notifyBuffer, i)
+ for(returnNotifyBuffer <- ReplyRecursion().down(reply, i)) {
+ notifyBuffer += returnNotifyBuffer
+ }
}
}
Ok(views.html.notifylist(notifyBuffer.drop(page*row).take(row), notifyBuffer.size, 0, designChange.id, designChange.dcNo, page, notifyType, state))
}
}
+
}
\ No newline at end of file