|
|
@@ -177,6 +177,38 @@ public class AuthController {
|
|
|
return HttpResult.ok(authService.login(reqVo));
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param reqVo 注册
|
|
|
+ * @return HttpResult
|
|
|
+ * @desc: 用户注册
|
|
|
+ * @author: czh
|
|
|
+ * @date: 2023/6/16
|
|
|
+ */
|
|
|
+ @PostMapping("/register")
|
|
|
+ public HttpResult register(@Valid @RequestBody RegisterReqVo reqVo,
|
|
|
+ @RequestHeader(name = "System-Type", required = true) int systemType) throws SystemException {
|
|
|
+ reqVo.setSystemType(systemType);
|
|
|
+ authService.register(reqVo);
|
|
|
+ return HttpResult.ok(HttpStatus.MSG_007);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param reqVo 忘记密码入参
|
|
|
+ * @return HttpResult
|
|
|
+ * @desc: 忘记密码
|
|
|
+ * @author: czh
|
|
|
+ * @date: 2023/6/19
|
|
|
+ */
|
|
|
+ @PostMapping("/forgetPassword")
|
|
|
+ public HttpResult forgetPassword(@Valid @RequestBody ForgetPasswordReqVo reqVo,
|
|
|
+ @RequestHeader(name = "System-Type", required = true) int systemType) throws SystemException {
|
|
|
+ reqVo.setSystemType(systemType);
|
|
|
+ authService.forgetPassword(reqVo);
|
|
|
+ return HttpResult.ok(HttpStatus.MSG_002);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* @param id 主键ID
|
|
|
* @description 重置密码
|