@Override public void addUser(User user) { // 业务逻辑代码 // dao userDao.save(user); }
@Override public User login(String loginName, String password) { // TODO Auto-generated method stub String[] propNames = new String[] {"loginName", "password"}; String[] propValues = new String[] {loginName, Md5Util.getMD5(password)}; return (User) userDao.findObjectByPars(User.class, propNames, propValues); }
@Override public QueryResult<User> getScrollData( int firstResult, int maxresult, String wherehql, Object[] queryParams, LinkedHashMap<String, String> orderby) { return userDao.getScrollData(firstResult, maxresult, wherehql, queryParams, orderby); }
@Override public List findAll() { return userDao.findAll(); }
@Override public void updateUser(User user) { // TODO Auto-generated method stub userDao.update(user); }
@Override public User getUserById(int id) { // TODO Auto-generated method stub return userDao.getEntityById(id); }
@Override public void delete(User user) { userDao.delete(user); }
@Override public void deleteAll(List idList) { userDao.deleteAll("id", idList); }
@Override public long getCount() { // TODO Auto-generated method stub return userDao.getCount(); }