2526272829303132
public void deleteUserVisitorById(Integer id) throws UserVisitorException { try{ UserVisitor userVisitor = (UserVisitor) baseDao.findById(UserVisitor.class, id); baseDao.delete(userVisitor); } catch (Exception e) { throw new UserVisitorException("UserVisitor删除异常"); } }
3839404142434445
@Transactional public void saveUserVisitor(UserVisitor userVisitor) throws UserVisitorException { try { baseDao.save(userVisitor); } catch (Exception e) { throw new UserVisitorException("UserVisitor保存异常"); } }
5152535455565758
@Transactional public UserVisitor findUserVisitorById(Integer id) throws UserVisitorException { try { return (UserVisitor) baseDao.findById(UserVisitor.class, id); } catch (Exception e) { throw new UserVisitorException("UserVisitor按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 UserVisitorException("UserVisitor分页异常"); } }
8788899091929394
Object[] values = CommonDaoUtil.commonQuery(map); hql += values[0].toString(); // Object[]需要进行强制转换. return baseDao.find(hql, (Object[]) values[1]); } catch (Exception e) { throw new UserVisitorException("查询UserVisitor全部异常"); } }