Tabnine Logo
VerificationCode.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
me.zhengjie.domain.VerificationCode
constructor

Best Java code snippets using me.zhengjie.domain.VerificationCode.<init> (Showing top 2 results out of 315)

origin: elunez/eladmin

@PostMapping(value = "/code/email/resetPass")
public ResponseEntity resetPass(@RequestParam String email) throws Exception {
  VerificationCode code = new VerificationCode();
  code.setType("email");
  code.setValue(email);
  code.setScenes(ElAdminConstant.RESET_MAIL);
  EmailVo emailVo = verificationCodeService.sendEmail(code);
  emailService.send(emailVo,emailService.find());
  return new ResponseEntity(HttpStatus.OK);
}
origin: elunez/eladmin

  /**
   * 修改邮箱
   * @param user
   * @param user
   * @return
   */
  @PostMapping(value = "/users/updateEmail/{code}")
  public ResponseEntity updateEmail(@PathVariable String code,@RequestBody User user){
    UserDetails userDetails = SecurityContextHolder.getUserDetails();
    JwtUser jwtUser = (JwtUser)userDetailsService.loadUserByUsername(userDetails.getUsername());
    if(!jwtUser.getPassword().equals(EncryptUtils.encryptPassword(user.getPassword()))){
      throw new BadRequestException("密码错误");
    }
    VerificationCode verificationCode = new VerificationCode(code, ElAdminConstant.RESET_MAIL,"email",user.getEmail());
    verificationCodeService.validated(verificationCode);
    userService.updateEmail(jwtUser,user.getEmail());
    return new ResponseEntity(HttpStatus.OK);
  }
}
me.zhengjie.domainVerificationCode<init>

Popular methods of VerificationCode

  • getCode
  • getScenes
  • getType
  • getValue
  • setCode
  • setScenes
  • setStatus
  • setType
  • setValue

Popular in Java

  • Finding current android device location
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • startActivity (Activity)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now