예제 #1
0
 @Override
 public void passwordReset(String mobile, String password, int captcha) {
   if (!checkCaptcha(mobile, captcha)) {
     throw new ServiceException("验证码错误!");
   }
   QueryCondition qc = userDao.getQC();
   qc.eq("mobile", mobile);
   User user = userDao.uniqueByQC(qc);
   if (null == user) {
     throw new ServiceException("用户不存在");
   }
   user.setPassword(password);
   userDao.update(user);
 }