Add username retrieval functionality to LoginController using RecentNamesMapper query
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user