2526272829303132
public void deleteFriendBlackById(Integer id) throws FriendBlackException { try{ FriendBlack friendBlack = (FriendBlack) baseDao.findById(FriendBlack.class, id); baseDao.delete(friendBlack); } catch (Exception e) { throw new FriendBlackException("FriendBlack删除异常"); } }
3839404142434445
@Transactional public void saveFriendBlack(FriendBlack friendBlack) throws FriendBlackException { try { baseDao.save(friendBlack); } catch (Exception e) { throw new FriendBlackException("FriendBlack保存异常"); } }
5152535455565758
@Transactional public FriendBlack findFriendBlackById(Integer id) throws FriendBlackException { try { return (FriendBlack) baseDao.findById(FriendBlack.class, id); } catch (Exception e) { throw new FriendBlackException("FriendBlack按ID查询异常"); } }
6970717273747576
Object[] values = CommonDaoUtil.commonQuery(map); hql += values[0].toString(); // Object[]需要进行强制转换. return baseDao.findPage(start, limit, hql, (Object[]) values[1]); } catch (Exception e) { throw new FriendBlackException("FriendBlack分页异常"); } }
8788899091929394
Object[] values = CommonDaoUtil.commonQuery(map); hql += values[0].toString(); // Object[]需要进行强制转换. return baseDao.find(hql, (Object[]) values[1]); } catch (Exception e) { throw new FriendBlackException("查询FriendBlack全部异常"); } }