From e42fbc536f2760f2fef430b1ad2917d580598278 Mon Sep 17 00:00:00 2001 From: 龚焕茏 <2842157468@qq.com> Date: 星期三, 05 六月 2024 16:04:55 +0800 Subject: [PATCH] feat:题目表移除分数字段、新增题目状态、条件多选 --- src/main/java/com/ycl/jxkg/controller/RegisterController.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/ycl/jxkg/controller/RegisterController.java b/src/main/java/com/ycl/jxkg/controller/RegisterController.java index dafb2d3..5e32121 100644 --- a/src/main/java/com/ycl/jxkg/controller/RegisterController.java +++ b/src/main/java/com/ycl/jxkg/controller/RegisterController.java @@ -2,6 +2,7 @@ import com.ycl.jxkg.base.Result; import com.ycl.jxkg.domain.form.RegisterForm; +import com.ycl.jxkg.service.AuthenticationService; import com.ycl.jxkg.service.UserService; import lombok.RequiredArgsConstructor; import org.springframework.validation.annotation.Validated; @@ -22,15 +23,18 @@ public class RegisterController { private final UserService userService; + private final AuthenticationService authenticationService; @PostMapping("/teacher") public Result teacherRegister(@RequestBody @Validated RegisterForm form) { + form.setPassword(authenticationService.pwdEncode(form.getPassword())); userService.teacherRegister(form); return Result.ok("娉ㄥ唽鎴愬姛"); } @PostMapping("/student") public Result studentRegister(@RequestBody @Validated RegisterForm form) { + form.setPassword(authenticationService.pwdEncode(form.getPassword())); userService.studentRegister(form); return Result.ok("娉ㄥ唽鎴愬姛"); } -- Gitblit v1.8.0