115116117118119120121122
} } else { return null; } } catch (Exception e) { throw new BlogException("Blog分页异常"); } }
179180181182183184185186
} else { return null; } } catch (Exception e) { throw new BlogException("Blog分页异常"); } }
3132333435363738
public void deleteBlogById(Integer id) throws BlogException { try { Blog blog = (Blog) baseDao.findById(Blog.class, id); baseDao.delete(blog); } catch (Exception e) { throw new BlogException("Blog删除异常"); } }
5051525354555657
baseDao.save(blog); feedService.saveFeed(blog); } catch (Exception e) { throw new BlogException("Blog保存异常"); } }
6364656667686970
@Transactional public Blog findBlogById(Integer id) throws BlogException { try { return (Blog) baseDao.findById(Blog.class, id); } catch (Exception e) { throw new BlogException("Blog按ID查询异常"); } }
100101102103104105106107
163164165166167168169170
181182183184185186187188
Object[] values = CommonDaoUtil.commonQuery(map); hql += values[0].toString(); // Object[]需要进行强制转换. return baseDao.find(hql, (Object[]) values[1]); } catch (Exception e) { throw new BlogException("查询Blog全部异常"); } }