huwhois преди 4 години
родител
ревизия
02b1bcd60e
променени са 2 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 3 2
      src/main/java/io/renren/modules/app/controller/AppRegisterController.java
  2. 1 1
      src/main/resources/application.yml

+ 3 - 2
src/main/java/io/renren/modules/app/controller/AppRegisterController.java

71
    @PostMapping("register")
71
    @PostMapping("register")
72
    @ApiOperation("注册")
72
    @ApiOperation("注册")
73
    public R register(@RequestBody RegisterForm form){
73
    public R register(@RequestBody RegisterForm form){
74
        //表单校验
75
         ValidatorUtils.validateEntity(form);
76
         
74
        boolean captcha = smsCodeService.validate(form.getUuid(), form.getCode(), form.getPhone());
77
        boolean captcha = smsCodeService.validate(form.getUuid(), form.getCode(), form.getPhone());
75
		if(!captcha){
78
		if(!captcha){
76
			return R.error("验证码不正确");
79
			return R.error("验证码不正确");
77
        }
80
        }
78
        
81
        
79
        //表单校验
80
         ValidatorUtils.validateEntity(form);
81
82
82
         UserEntity user = new UserEntity();
83
         UserEntity user = new UserEntity();
83
         user.setPhone(form.getPhone());
84
         user.setPhone(form.getPhone());

+ 1 - 1
src/main/resources/application.yml

12
spring:
12
spring:
13
  # 环境 dev|test|prod
13
  # 环境 dev|test|prod
14
  profiles:
14
  profiles:
15
    active: test
15
    active: dev
16
  # jackson时间格式化
16
  # jackson时间格式化
17
  jackson:
17
  jackson:
18
    time-zone: GMT+8
18
    time-zone: GMT+8