@@ -14,6 +14,6 @@ public interface DataSyncRepo
JpaRepository<DataSyncEntity, Long>,
JpaSpecificationExecutor<DataSyncEntity> {
- List<DataSyncEntity> findTop10ByComponent(String component);
+ List<DataSyncEntity> findTop10ByComponentOrderById(String component);
}
@@ -46,7 +46,7 @@ public class DataSyncTask extends AbstractTask {
String component = scheduleJob.getExt1();
while (true) {
- List<DataSyncEntity> list = dataSyncRepo.findTop10ByComponent(component);
+ List<DataSyncEntity> list = dataSyncRepo.findTop10ByComponentOrderById(component);
if (CollectionUtils.isEmpty(list)) {
break;