fix: 修复PasskeyRegistrationEndpoint中@PathVariable注解缺少value属性的问题

This commit is contained in:
Spock12138
2025-09-12 12:23:50 +08:00
parent 33734f1387
commit 0733ce2d17
17 changed files with 23 additions and 156 deletions

View File

@@ -17,6 +17,7 @@
package org.dromara.maxkey.persistence.mapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
@@ -70,7 +71,7 @@ public interface PasskeyChallengeMapper extends IJpaMapper<PasskeyChallenge> {
@Result(column = "status", property = "status"),
@Result(column = "inst_id", property = "instId")
})
PasskeyChallenge findLatestByUserIdAndType(String userId, String challengeType);
PasskeyChallenge findLatestByUserIdAndType(@Param("userId") String userId, @Param("challengeType") String challengeType);
/**
* 删除指定挑战ID的记录
@@ -106,7 +107,7 @@ public interface PasskeyChallengeMapper extends IJpaMapper<PasskeyChallenge> {
* @return 清理的记录数
*/
@Delete("DELETE FROM mxk_passkey_challenges WHERE user_id = #{userId} AND challenge_type = #{challengeType}")
int deleteByUserIdAndType(String userId, String challengeType);
int deleteByUserIdAndType(@Param("userId") String userId, @Param("challengeType") String challengeType);
/**
* 统计指定用户的挑战数量

View File

@@ -19,6 +19,7 @@ package org.dromara.maxkey.persistence.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
@@ -102,7 +103,7 @@ public interface UserPasskeyMapper extends IJpaMapper<UserPasskey> {
@Result(column = "status", property = "status"),
@Result(column = "inst_id", property = "instId")
})
UserPasskey findByUserIdAndCredentialId(String userId, String credentialId);
UserPasskey findByUserIdAndCredentialId(@Param("userId") String userId, @Param("credentialId") String credentialId);
/**
* 更新签名计数器
@@ -112,7 +113,7 @@ public interface UserPasskeyMapper extends IJpaMapper<UserPasskey> {
* @return 更新的记录数
*/
@Update("UPDATE mxk_user_passkeys SET signature_count = #{signatureCount}, last_used_date = NOW() WHERE credential_id = #{credentialId}")
int updateSignatureCount(String credentialId, Long signatureCount);
int updateSignatureCount(@Param("credentialId") String credentialId, @Param("signatureCount") Long signatureCount);
/**
* 物理删除Passkey
@@ -122,7 +123,7 @@ public interface UserPasskeyMapper extends IJpaMapper<UserPasskey> {
* @return 删除的记录数
*/
@Delete("DELETE FROM mxk_user_passkeys WHERE user_id = #{userId} AND credential_id = #{credentialId}")
int deleteByUserIdAndCredentialId(String userId, String credentialId);
int deleteByUserIdAndCredentialId(@Param("userId") String userId, @Param("credentialId") String credentialId);
/**
* 物理删除过期的Passkey记录

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2024] [MaxKey of copyright http://www.maxkey.top]
* Copyright [2025] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright [2024] [MaxKey of copyright http://www.maxkey.top]
* Copyright [2025] [MaxKey of copyright http://www.maxkey.top]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.