|
@@ -20,6 +20,7 @@ import com.xjrsoft.common.exception.MyException;
|
|
|
import com.xjrsoft.common.model.result.R;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
+import com.xjrsoft.common.sms.SmsCtcc;
|
|
|
import com.xjrsoft.common.utils.RedisUtil;
|
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.config.CommonPropertiesConfig;
|
|
@@ -73,6 +74,8 @@ public class UserController {
|
|
|
|
|
|
private final RedisUtil redisUtil;
|
|
|
|
|
|
+ private final SmsCtcc smsCtcc;
|
|
|
+
|
|
|
|
|
|
@GetMapping(value = "/list")
|
|
|
@ApiOperation(value = "用户列表(不分页)")
|
|
@@ -361,6 +364,10 @@ public class UserController {
|
|
|
@PostMapping("/register")
|
|
|
@ApiOperation(value = "家长注册")
|
|
|
public R register(@Valid @RequestBody AddUserDto dto) {
|
|
|
+
|
|
|
+ if (!smsCtcc.captchaVerify(dto.getMobile(), dto.getCode())) {
|
|
|
+ return R.error("验证码不正确!");
|
|
|
+ }
|
|
|
|
|
|
dto.setPostId(RoleEnum.PARENT.getCode());
|
|
|
return R.ok(userService.add(dto));
|