Album album = albumService.getAlbumById(albumId);
// 判断权限
if (album != null) {
int albumAuth = album.getAuthority();
if (authority < albumAuth) {
throw new NoVisitPermissionException("ID为:" + viewerId + "的用户没有访问ID为:"
+ album.getId() + "相册的权限");
}
} else {
throw new NoVisitPermissionException("ID:" + viewerId + "没有访问相册的权限");
}
List<Photo> photos = albumService.listPhotosOfAlbum(albumId, viewerId, authority, page,
addVisitCount);
ModelAndView mav = new ModelAndView(ViewPaths.ALBUM_VIEWALBUM);