Add username retrieval functionality to LoginController using RecentNamesMapper query

This commit is contained in:
2025-08-05 23:12:50 +02:00
parent ae1e972438
commit bdb38e5011
2 changed files with 59 additions and 0 deletions
@@ -7,6 +7,16 @@ import java.util.ArrayList;
import java.util.List;
public interface RecentNamesMapper {
@Select("""
SELECT DISTINCT name AS username
FROM litebans_history
WHERE uuid = #{uuid}
ORDER BY date DESC;
""")
String getUsername(@Param("uuid") String uuid);
@Select("""
SELECT DISTINCT user_lookup.name AS punished_name
FROM ${tableName} AS punishment