@Override
 @Transactional
 public void updateIdnumber(Long userId, String idnumber) {
   UserPO po = userDao.get(userId);
   if (null != po) {
     po.setIdNumber(idnumber);
   }
 }
 @Override
 @Transactional
 public void updateRealname(Long userId, String realname) {
   UserPO po = userDao.get(userId);
   if (null != po) {
     po.setRealname(realname);
   }
 }
 @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;
 }
 @Override
 @Transactional
 public User getUser(long userId) {
   UserPO po = userDao.get(userId);
   User u = null;
   if (null != po) {
     u = new User();
     BeanUtils.copyProperties(po, u);
   }
   return u;
 }
  @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;
  }
 @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());
 }