* 通知的ID
* @return ModelAndView
*/
@RequestMapping(value = "/view/{id}", method = RequestMethod.GET)
public ModelAndView viewNotifiction(@PathVariable Long id) {
Notification notification = noticeService.getNotificationById(id);
String viewName = null;
if (notification != null) {
if (notification.getType().equals(NotificationType.ARTICLE_COMMENT)) {
viewName = "/article/view/" + notification.getResourceId();
} else if (notification.getType().equals(NotificationType.ALBUM_COMMENT)) {
// TODO:
} else if (notification.getType().equals(NotificationType.ATTENTION)) {
// TODO:
} else if (notification.getType().equals(NotificationType.MANAGE_NOTIFICATION)) {
// TODO:
} else if (notification.getType().equals(NotificationType.PHOTO_COMMENT)) {
// TODO:
}
}
viewName += URL_SUFFIX;
ModelAndView mav = new ModelAndView();