|
@@ -8,7 +8,7 @@ import com.backendsys.modules.system.entity.SysAuth;
|
|
|
import com.backendsys.modules.system.entity.SysAuthPhone;
|
|
|
import com.backendsys.modules.system.entity.SysMobileArea;
|
|
|
import com.backendsys.modules.system.entity.SysUserDTO;
|
|
|
-import com.backendsys.modules.system.service.SysAuthV2Service;
|
|
|
+import com.backendsys.modules.system.service.SysAuthService;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
@@ -27,20 +27,20 @@ import java.io.IOException;
|
|
|
public class SysAuthController {
|
|
|
|
|
|
@Autowired
|
|
|
- private SysAuthV2Service sysAuthV2Service;
|
|
|
+ private SysAuthService sysAuthService;
|
|
|
|
|
|
// -------------------------------------------------------------------------------------------------
|
|
|
|
|
|
@Operation(summary = "获取图形验证码")
|
|
|
@GetMapping("/api/system/auth/getCaptcha")
|
|
|
public void getCaptcha(HttpServletResponse response) throws IOException {
|
|
|
- sysAuthV2Service.renderCaptcha(response);
|
|
|
+ sysAuthService.renderCaptcha(response);
|
|
|
}
|
|
|
@SysLog("系统用户登录 (用户名)")
|
|
|
@Operation(summary = "系统用户登录 (用户名)")
|
|
|
@PostMapping(value = "/api/system/auth/login")
|
|
|
public Result systemLogin(@Validated(SysAuth.Login.class) @RequestBody SysAuth sysAuth) {
|
|
|
- return Result.success().put("data", sysAuthV2Service.login(sysAuth));
|
|
|
+ return Result.success().put("data", sysAuthService.login(sysAuth));
|
|
|
}
|
|
|
// -------------------------------------------------------------------------------------------------
|
|
|
|
|
@@ -49,13 +49,13 @@ public class SysAuthController {
|
|
|
@RateLimiting(key = "getMobileAreaCode")
|
|
|
@GetMapping("/api/system/getMobileAreaCode")
|
|
|
public Result getMobileAreaCode(@Validated SysMobileArea sysMobileArea) {
|
|
|
- return Result.success().put("data", sysAuthV2Service.getMobileAreaList(sysMobileArea));
|
|
|
+ return Result.success().put("data", sysAuthService.getMobileAreaList(sysMobileArea));
|
|
|
}
|
|
|
@Operation(summary = "系统用户登录 (手机号码)")
|
|
|
@PostMapping(value = "/api/system/auth/loginWithPhone")
|
|
|
@RateLimiting(key = "systemLoginWithPhone")
|
|
|
public Result systemLoginWithPhone(@Validated(SysAuthPhone.Login.class) @RequestBody SysAuthPhone sysAuthPhone) {
|
|
|
- return Result.success().put("data", sysAuthV2Service.loginWithPhone(sysAuthPhone));
|
|
|
+ return Result.success().put("data", sysAuthService.loginWithPhone(sysAuthPhone));
|
|
|
}
|
|
|
|
|
|
@Anonymous
|
|
@@ -63,20 +63,20 @@ public class SysAuthController {
|
|
|
@PostMapping("/api/system/auth/register")
|
|
|
@RateLimiting(key = "registerUser", limit = 5)
|
|
|
public Result register(@Validated(SysUserDTO.Register.class) @RequestBody SysUserDTO sysUserDTO) {
|
|
|
- return Result.success().put("data", sysAuthV2Service.register(sysUserDTO));
|
|
|
+ return Result.success().put("data", sysAuthService.register(sysUserDTO));
|
|
|
}
|
|
|
|
|
|
@Anonymous
|
|
|
@Operation(summary = "忘记密码")
|
|
|
@PostMapping("/api/system/user/forgotPassword")
|
|
|
public Result forgotPassword(@Validated(SysUserDTO.ForgotPassword.class) @RequestBody SysUserDTO sysUserDTO) {
|
|
|
- return Result.success().put("data", sysAuthV2Service.forgotPassword(sysUserDTO));
|
|
|
+ return Result.success().put("data", sysAuthService.forgotPassword(sysUserDTO));
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "退出登录")
|
|
|
@PostMapping(value = "/api/system/user/logout")
|
|
|
public Result systemLogout() {
|
|
|
- return Result.success().put("data", sysAuthV2Service.logout());
|
|
|
+ return Result.success().put("data", sysAuthService.logout());
|
|
|
}
|
|
|
|
|
|
}
|