@Override public UserAccount updateUserLogin(UserAccount userAccount) { UserAccount account = null; if (userAccount.getId() == null) { return null; } account = dao.findById(userAccount.getId()); if (account == null) { return null; } Integer size = account.getLoginSize(); if (size == null) { size = 1; } size++; account.setLoginSize(size); account.setLastDate(new Date()); return account; }
@Override public UserAccount updateUserLogin(UserAccount userAccount) { UserAccount account = null; if (userAccount.getId() == null) { return null; } account = dao.findById(userAccount.getId()); if (account == null) { return null; } Integer size = account.getLoginSize(); if (size == null) { size = 1; } size++; account.setLoginSize(size); account.setLastDate(new Date()); return account; }
userAccount.setAccountType(AccountType.Phone); userAccount.setAddDate(new Date()); userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user);
userAccount.setAccountType(AccountType.Phone); userAccount.setAddDate(new Date()); userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user);
userAccount.setAccountType(AccountType.Phone); userAccount.setAddDate(new Date()); userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user);
userAccount.setAccountType(AccountType.Phone); userAccount.setAddDate(new Date()); userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user);
@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; }
@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; }
userAccount.setAccountType(AccountType.Phone); userAccount.setAddDate(new Date()); userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user);
userAccount.setAccountType(AccountType.Phone); userAccount.setAddDate(new Date()); userAccount.setLoginSize(0); userAccount.setLastDate(new Date()); userAccount.setUser(user);