🐛 fix: Add a file query limit to ensure that the number of records returned does not exceed 20.

This commit is contained in:
jarvis2f 2024-12-30 09:44:33 +08:00
parent 6fced7be27
commit b211739310

View file

@ -121,7 +121,7 @@ public class FileRepositoryImpl implements FileRepository {
return Future.all( return Future.all(
SqlTemplate SqlTemplate
.forQuery(pool, """ .forQuery(pool, """
SELECT * FROM file_record WHERE %s ORDER BY date DESC SELECT * FROM file_record WHERE %s ORDER BY date DESC LIMIT 20
""".formatted(whereClause)) """.formatted(whereClause))
.mapTo(FileRecord.ROW_MAPPER) .mapTo(FileRecord.ROW_MAPPER)
.execute(params) .execute(params)