/** * 按登录名查询用户 * * @param loginName * @return 用户对象 */ public User getUser(String loginName) { return userDao.findUniqueBy("loginName", loginName); }
/** * 删除用户 * * @param id */ @Transactional(readOnly = false) public void delete(String id) { if (!isSupervisor(id)) userDao.delete(id); }
/** * 保存用户 * * @param user */ @Transactional(readOnly = false) public void save(User user) { entryptPassword(user); user.setCreateDate(DateUtils.getSysTimestamp()); userDao.save(user); }
/** * 修改密码 * * @param user */ @Transactional(readOnly = false) public void updatePwd(User user) { entryptPassword(user); userDao.save(user); }
/** * 查询用户信息 * * @param userName 用户name * @return user */ public User getUserInfo(String userName) { return userDao.getUserInfo(userName); }