Skip to content

Commit

Permalink
优化验证码验证
Browse files Browse the repository at this point in the history
  • Loading branch information
TreasureJade committed Nov 4, 2019
1 parent 0bb0c4a commit dbace30
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
import com.swpu.uchain.blog.security.JwtProperties;
import com.swpu.uchain.blog.security.JwtUserDetailServiceImpl;
import com.swpu.uchain.blog.service.UserService;
import com.swpu.uchain.blog.util.AliyunSmsUtils;
import com.swpu.uchain.blog.util.JwtTokenUtil;
import com.swpu.uchain.blog.util.ResultVOUtil;
import com.swpu.uchain.blog.util.UploadFileUtil;
import com.swpu.uchain.blog.util.*;
import com.swpu.uchain.blog.vo.ResultVO;
import com.swpu.uchain.blog.vo.UserVO;
import lombok.extern.slf4j.Slf4j;
Expand Down Expand Up @@ -164,7 +161,7 @@ public ResultVO insertUser(UserInsertForm userInsertForm) {

@Override
public ResultVO getValidationCode(String phoneNumber) {
String code = AliyunSmsUtils.setCode();
String code = RandomUtil.setCode();
try {
AliyunSmsUtils.sendInsertUserMsg(phoneNumber, code, TemplateCodeEnum.INSERTUSER.getValue());
redisService.set(PhoneCodeKey.phoneCodeKey, phoneNumber, code);
Expand Down

0 comments on commit dbace30

Please sign in to comment.