@Override public UserAccountVo binding(String phone, Long user, AccountType type, String password) { UserAccountVo result = new UserAccountVo(); Long size = checkUserName(phone, type); if (size > 0) { result.setCode(-1); result.setMsg("该账号已被使用"); return result; } UserInfo info = infoDao.findById(user); if (info == null) { result.setCode(-2); result.setMsg("用户信息不存在"); return result; } info.setPhone(phone); UserAccount bean = new UserAccount(); bean.setAccountType(type); bean.setUsername(phone); bean.setLoginSize(0); if (password != null) { SecurityUtil securityUtil = new SecurityUtil(); String oldpassword = securityUtil.entryptPassword(password); bean.setPassword(oldpassword); bean.setSalt(securityUtil.getSalt()); } bean.setUser(info); save(bean); return result; }
user.setName(bean.getUsername()); infoDao.save(user); bean.setUser(user); SecurityUtil securityUtil = new SecurityUtil(); String oldpassword = securityUtil.entryptPassword(bean.getPassword());
@Override public UserAccountVo binding(String phone, Long user, AccountType type, String password) { UserAccountVo result = new UserAccountVo(); Long size = checkUserName(phone, type); if (size > 0) { result.setCode(-1); result.setMsg("该账号已被使用"); return result; } UserInfo info = infoDao.findById(user); if (info == null) { result.setCode(-2); result.setMsg("用户信息不存在"); return result; } info.setPhone(phone); UserAccount bean = new UserAccount(); bean.setAccountType(type); bean.setUsername(phone); bean.setLoginSize(0); if (password != null) { SecurityUtil securityUtil = new SecurityUtil(); String oldpassword = securityUtil.entryptPassword(password); bean.setPassword(oldpassword); bean.setSalt(securityUtil.getSalt()); } bean.setUser(info); save(bean); return result; }
user.setName(bean.getUsername()); infoDao.save(user); bean.setUser(user); SecurityUtil securityUtil = new SecurityUtil(); String oldpassword = securityUtil.entryptPassword(bean.getPassword());
userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user); userAccount = accountDao.save(userAccount);
userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user); userAccount = accountDao.save(userAccount);
userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user); userAccount = accountDao.save(userAccount); handleUserInfo(result, user);
userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user); userAccount = accountDao.save(userAccount); handleUserInfo(result, user);
userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user); userAccount = accountDao.save(userAccount);
userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user); userAccount = accountDao.save(userAccount);