UserInfoService { public UserInfo getLoginUserInfo(UserInfo userInfo) throws Exception { loginSecurity.checkLoginErrorTimes(userInfo); UserInfo dbUserInfo=getUserInfo(userInfo); if (dbUserInfo == null) { throw new BizException(resultCodeConfiguration.getLoginNameWrong(), resultCodeConfiguration.getLoginNameWrongMsg()); } String salt= DesUtil.encrypt(userInfo.getLoginName()); String password=MD5Util.md5Encode(MD5Util.md5Encode(userInfo.getPassword())+salt); if (password.equals(dbUserInfo.getPassword())) { return dbUserInfo; } else { loginSecurity.addLoginErrorTimes(userInfo); throw new BizException(resultCodeConfiguration.getPasswordWrong(), resultCodeConfiguration.getPasswordWrongMsg()); } }  UserInfo getLoginUserInfo(UserInfo userInfo); UserInfo getUserInfo(UserInfo userInfo); @Transactional(readOnly = false) void addUserInfo(UserInfo userInfo); UserInfo getUserInfo(Integer id); List<UserInfo> findAll();  }
@Test public void getLoginUserInfo() throws Exception { }