diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserMapper.xml index bb4c14a790..97c9279589 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserMapper.xml @@ -31,6 +31,7 @@ AND u.email like CONCAT('%', #{userRequest.email},'%') + order by u.update_time desc diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.xml index b7d42f3e7b..5b15cd3e29 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtUserRoleMapper.xml @@ -43,6 +43,7 @@ AND `user`.name like CONCAT('%', #{member.name},'%') + order by user_role.update_time desc \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/service/OrganizationService.java b/backend/src/main/java/io/metersphere/service/OrganizationService.java index 6d46781d98..0d354c7f39 100644 --- a/backend/src/main/java/io/metersphere/service/OrganizationService.java +++ b/backend/src/main/java/io/metersphere/service/OrganizationService.java @@ -63,6 +63,7 @@ public class OrganizationService { if (StringUtils.isNotBlank(request.getName())) { criteria.andNameLike(StringUtils.wrapIfMissing(request.getName(), "%")); } + example.setOrderByClause("update_time desc"); return organizationMapper.selectByExample(example); } diff --git a/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java b/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java index e7223294bc..2dc3f85df0 100644 --- a/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java +++ b/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java @@ -125,6 +125,7 @@ public class TestResourcePoolService { if (StringUtils.isNotBlank(request.getName())) { criteria.andNameLike(StringUtils.wrapIfMissing(request.getName(), "%")); } + example.setOrderByClause("update_time desc"); List testResourcePools = testResourcePoolMapper.selectByExample(example); List testResourcePoolDTOS = new ArrayList<>(); testResourcePools.forEach(pool -> { diff --git a/backend/src/main/java/io/metersphere/service/WorkspaceService.java b/backend/src/main/java/io/metersphere/service/WorkspaceService.java index 0ce05fde8e..bb1948998a 100644 --- a/backend/src/main/java/io/metersphere/service/WorkspaceService.java +++ b/backend/src/main/java/io/metersphere/service/WorkspaceService.java @@ -83,6 +83,7 @@ public class WorkspaceService { if (StringUtils.isNotBlank(request.getName())) { criteria.andNameLike(StringUtils.wrapIfMissing(request.getName(), "%")); } + example.setOrderByClause("update_time desc"); return workspaceMapper.selectByExample(example); }