refactor: 优化微信小程序授权登录命名

This commit is contained in:
Ray.Hao
2025-05-28 23:09:30 +08:00
parent 1ff53a1c96
commit 8934d2da99
3 changed files with 6 additions and 6 deletions

View File

@@ -63,13 +63,13 @@ public class AuthController {
return Result.success(authenticationToken);
}
@Operation(summary = "微信授权登录")
@PostMapping("/login/wechat")
@Operation(summary = "微信小程序授权登录")
@PostMapping("/login/wechat-mini-program")
@Log(value = "微信登录", module = LogModuleEnum.LOGIN)
public Result<AuthenticationToken> loginByWechat(
public Result<AuthenticationToken> loginByWechatMiniProgram(
@Parameter(description = "微信授权码", example = "code") @RequestParam String code
) {
AuthenticationToken loginResult = authService.loginByWechat(code);
AuthenticationToken loginResult = authService.loginByWechatMiniProgram(code);
return Result.success(loginResult);
}

View File

@@ -46,7 +46,7 @@ public interface AuthService {
* @param code 微信登录code
* @return 登录结果
*/
AuthenticationToken loginByWechat(String code);
AuthenticationToken loginByWechatMiniProgram(String code);
/**
* 发送短信验证码

View File

@@ -85,7 +85,7 @@ public class AuthServiceImpl implements AuthService {
* @return 访问令牌
*/
@Override
public AuthenticationToken loginByWechat(String code) {
public AuthenticationToken loginByWechatMiniProgram(String code) {
// 1. 创建用户微信认证的令牌(未认证)
WechatAuthenticationToken wechatAuthenticationToken = new WechatAuthenticationToken(code);