From 814650a7fe755b5de1d78e25a9e3d4f5846dc962 Mon Sep 17 00:00:00 2001 From: Yulian Han Date: Mon, 6 Jan 2020 18:01:20 +0800 Subject: Bug fix for Multi-result row data order Change-Id: Idaa55084f5ecb0dd3636c232cebc14fa5f064419 Issue-ID: SO-2071 Signed-off-by: Yulian Han --- .../so/db/request/data/repository/InfraActiveRequestsRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mso-api-handlers/mso-requests-db-repositories/src/main') diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java index 257e319ce5..927477e146 100644 --- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java +++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepository.java @@ -41,7 +41,7 @@ public interface InfraActiveRequestsRepository List findByStartTimeLessThanAndEndTime(Date startTime, Date endTime, Pageable request); - @Query(value = "SELECT * FROM infra_active_requests WHERE request_status = 'IN_PROGRESS' AND (request_scope = 'volumeGroup' OR request_scope = 'vfModule') AND start_time < (NOW() - INTERVAL 2 MINUTE)", - nativeQuery = true) + @Query(value = "SELECT * FROM infra_active_requests WHERE request_status = 'IN_PROGRESS' AND (request_scope = 'volumeGroup' OR request_scope = 'vfModule') AND start_time < (NOW() - INTERVAL 2 MINUTE)" + + " ORDER BY start_time DESC", nativeQuery = true) List getInProgressVolumeGroupsAndVfModules(); } -- cgit 1.2.3-korg