Sort history query results by time in descending order.
Added `ORDER BY time DESC` to ensure that history query results are consistently returned with the most recent entries first. This update improves data clarity and usability for end-users.
This commit is contained in:
parent
4b5a49b82a
commit
02c69b318a
|
|
@ -80,6 +80,7 @@ public interface NameHistoryMapper {
|
|||
FROM ${tableName} AS punishment
|
||||
INNER JOIN user_lookup ON user_lookup.uuid = punishment.uuid
|
||||
WHERE ${name_column} LIKE #{partialName}
|
||||
ORDER BY time DESC
|
||||
LIMIT #{limit} OFFSET #{offset}
|
||||
""")
|
||||
List<HistoryRecord> getRecentHistory(@Param("tableName") String tableName,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ public interface UUIDHistoryMapper {
|
|||
INNER JOIN user_lookup
|
||||
ON user_lookup.uuid = all_punishments.uuid
|
||||
WHERE all_punishments.${uuid_column} = #{uuid}
|
||||
ORDER BY time DESC
|
||||
LIMIT #{limit} OFFSET #{offset}
|
||||
""")
|
||||
List<HistoryRecord> getRecentAllHistory(@Param("uuid") String uuid,
|
||||
|
|
@ -56,6 +57,7 @@ public interface UUIDHistoryMapper {
|
|||
FROM ${tableName} AS punishment
|
||||
INNER JOIN user_lookup ON user_lookup.uuid = punishment.uuid
|
||||
WHERE punishment.${uuid_column} = #{uuid}
|
||||
ORDER BY time DESC
|
||||
LIMIT #{limit} OFFSET #{offset}
|
||||
""")
|
||||
List<HistoryRecord> getRecentHistory(@Param("tableName") String tableName,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user