Example #1
0
 @Override
 @Transactional
 public void updateIdnumber(Long userId, String idnumber) {
   UserPO po = userDao.get(userId);
   if (null != po) {
     po.setIdNumber(idnumber);
   }
 }
Example #2
0
 @Override
 @Transactional
 public void updateRealname(Long userId, String realname) {
   UserPO po = userDao.get(userId);
   if (null != po) {
     po.setRealname(realname);
   }
 }
Example #3
0
 @Override
 @Transactional
 public String resetPassword(long userId) {
   // 产生随机码
   String pwd = "" + Math.abs(RandomUtils.nextInt(99999999));
   UserPO po = userDao.get(userId);
   po.setPassword(Text.MD5Encode(pwd));
   return pwd;
 }
Example #4
0
 @Override
 @Transactional
 public User getUser(String username, String realname) {
   UserPO po = userDao.getUserByUsername(username);
   User u = null;
   if (null != po && realname.equals(po.getRealname())) {
     u = new User();
     BeanUtils.copyProperties(po, u);
   }
   return u;
 }
Example #5
0
  @Override
  @Transactional
  public int unlockUserAccount(long id) {
    UserPO po = userDao.get(id);
    po.setLoginFailureNumber(0);
    po.setIsLocked(0);
    Calendar cal = Calendar.getInstance();
    cal.set(1970, 0, 1, 0, 0, 0);
    Date d = cal.getTime();
    po.setLocked_time(d);

    return 1;
  }
Example #6
0
 @Override
 @Transactional
 public void update(User user) {
   UserPO userPO = userDao.get(user.getId());
   userPO.setSinaWeiboUid(user.getSinaWeiboUid());
   userPO.setSinaWeiboToken(user.getSinaWeiboToken());
   userPO.setQqConnectUid(user.getQqConnectUid());
   userPO.setQqConnectToken(user.getQqConnectToken());
   userPO.setWeixinUid(user.getWeixinUid());
   userPO.setWeixinPCUid(user.getWeixinPCUid());
   userPO.setWeixinUnionId(user.getWeixinUnionId());
   userPO.setWeixinToken(user.getWeixinToken());
   userPO.setAlipayUid(user.getAlipayUid());
   userPO.setAlipayToken(user.getAlipayToken());
   userPO.setNickName(user.getNickName());
   userPO.setHeadImageURL(user.getHeadImageURL());
 }