diff --git a/boot/platform/src/main/java/com/platform/boot/relational/menus/MenusService.java b/boot/platform/src/main/java/com/platform/boot/relational/menus/MenusService.java index 4ddf4f5f..a39aeb98 100644 --- a/boot/platform/src/main/java/com/platform/boot/relational/menus/MenusService.java +++ b/boot/platform/src/main/java/com/platform/boot/relational/menus/MenusService.java @@ -37,7 +37,7 @@ public Flux search(MenuRequest request) { var cacheKey = BeanUtils.cacheKey(request); Query query = Query.query(request.toCriteria()).sort(Sort.by("sort")); return this.queryWithCache(cacheKey, query, Menu.class) - .flatMap(ContextUtils::serializeUserAuditor); + .flatMapSequential(ContextUtils::serializeUserAuditor); } public Mono add(MenuRequest request) { diff --git a/boot/platform/src/main/java/com/platform/boot/security/core/group/GroupsService.java b/boot/platform/src/main/java/com/platform/boot/security/core/group/GroupsService.java index 1cbfd4df..6691c6be 100644 --- a/boot/platform/src/main/java/com/platform/boot/security/core/group/GroupsService.java +++ b/boot/platform/src/main/java/com/platform/boot/security/core/group/GroupsService.java @@ -27,7 +27,7 @@ public Flux search(GroupRequest request, Pageable pageable) { ParamSql paramSql = request.bindParamSql(); String query = "select * from se_groups" + paramSql.whereSql() + CriteriaUtils.applyPage(pageable); return super.queryWithCache(cacheKey, query, paramSql.params(), Group.class) - .flatMap(ContextUtils::serializeUserAuditor); + .flatMapSequential(ContextUtils::serializeUserAuditor); } public Mono> page(GroupRequest request, Pageable pageable) { diff --git a/boot/platform/src/main/java/com/platform/boot/security/core/group/authority/GroupAuthoritiesService.java b/boot/platform/src/main/java/com/platform/boot/security/core/group/authority/GroupAuthoritiesService.java index 8237f002..2ed3b39f 100644 --- a/boot/platform/src/main/java/com/platform/boot/security/core/group/authority/GroupAuthoritiesService.java +++ b/boot/platform/src/main/java/com/platform/boot/security/core/group/authority/GroupAuthoritiesService.java @@ -34,7 +34,7 @@ public Flux search(GroupAuthorityRequest request, Pageable pagea Query query = Query.query(request.toCriteria()).with(pageable); return super.queryWithCache(cacheKey, query, GroupAuthority.class) - .flatMap(ContextUtils::serializeUserAuditor); + .flatMapSequential(ContextUtils::serializeUserAuditor); } @Transactional(rollbackFor = Exception.class) diff --git a/boot/platform/src/main/java/com/platform/boot/security/core/group/member/GroupMembersService.java b/boot/platform/src/main/java/com/platform/boot/security/core/group/member/GroupMembersService.java index d73ba6fb..63ecf36c 100644 --- a/boot/platform/src/main/java/com/platform/boot/security/core/group/member/GroupMembersService.java +++ b/boot/platform/src/main/java/com/platform/boot/security/core/group/member/GroupMembersService.java @@ -4,6 +4,7 @@ import com.platform.boot.commons.query.CriteriaUtils; import com.platform.boot.commons.query.ParamSql; import com.platform.boot.commons.utils.BeanUtils; +import com.platform.boot.commons.utils.ContextUtils; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; @@ -37,7 +38,8 @@ public Flux search(GroupMemberRequest request, Pageable pag var cacheKey = BeanUtils.cacheKey(request, pageable); ParamSql paramSql = request.toParamSql(); String query = QUERY_SQL + paramSql.whereSql() + CriteriaUtils.applyPage(pageable); - return super.queryWithCache(cacheKey, query, paramSql.params(), GroupMemberResponse.class); + return super.queryWithCache(cacheKey, query, paramSql.params(), GroupMemberResponse.class) + .flatMapSequential(ContextUtils::serializeUserAuditor); } public Mono> page(GroupMemberRequest request, Pageable pageable) { diff --git a/boot/platform/src/main/java/com/platform/boot/security/core/tenant/TenantsService.java b/boot/platform/src/main/java/com/platform/boot/security/core/tenant/TenantsService.java index 11ff9704..b680c642 100644 --- a/boot/platform/src/main/java/com/platform/boot/security/core/tenant/TenantsService.java +++ b/boot/platform/src/main/java/com/platform/boot/security/core/tenant/TenantsService.java @@ -29,7 +29,7 @@ public Flux search(TenantRequest request, Pageable pageable) { ParamSql paramSql = request.bindParamSql(); String query = "select * from se_tenants" + paramSql.whereSql() + CriteriaUtils.applyPage(pageable); return super.queryWithCache(cacheKey, query, paramSql.params(), Tenant.class) - .flatMap(ContextUtils::serializeUserAuditor); + .flatMapSequential(ContextUtils::serializeUserAuditor); } public Mono> page(TenantRequest request, Pageable pageable) { diff --git a/boot/platform/src/main/java/com/platform/boot/security/core/tenant/member/TenantMembersService.java b/boot/platform/src/main/java/com/platform/boot/security/core/tenant/member/TenantMembersService.java index 04401eac..3ed4e5b9 100644 --- a/boot/platform/src/main/java/com/platform/boot/security/core/tenant/member/TenantMembersService.java +++ b/boot/platform/src/main/java/com/platform/boot/security/core/tenant/member/TenantMembersService.java @@ -4,6 +4,7 @@ import com.platform.boot.commons.query.CriteriaUtils; import com.platform.boot.commons.query.ParamSql; import com.platform.boot.commons.utils.BeanUtils; +import com.platform.boot.commons.utils.ContextUtils; import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; @@ -40,7 +41,8 @@ public Flux search(TenantMemberRequest request, Pageable p var cacheKey = BeanUtils.cacheKey(request, pageable); ParamSql paramSql = request.toParamSql(); String query = QUERY_SQL + paramSql.whereSql() + CriteriaUtils.applyPage(pageable, "a"); - return super.queryWithCache(cacheKey, query, paramSql.params(), TenantMemberResponse.class); + return super.queryWithCache(cacheKey, query, paramSql.params(), TenantMemberResponse.class) + .flatMapSequential(ContextUtils::serializeUserAuditor); } public Mono> page(TenantMemberRequest request, Pageable pageable) { diff --git a/boot/platform/src/main/java/com/platform/boot/security/core/user/authority/UserAuthoritiesService.java b/boot/platform/src/main/java/com/platform/boot/security/core/user/authority/UserAuthoritiesService.java index 24e01b2a..bbfa72e6 100644 --- a/boot/platform/src/main/java/com/platform/boot/security/core/user/authority/UserAuthoritiesService.java +++ b/boot/platform/src/main/java/com/platform/boot/security/core/user/authority/UserAuthoritiesService.java @@ -23,7 +23,7 @@ public Flux search(UserAuthorityRequest request) { var cacheKey = BeanUtils.cacheKey(request); Query query = Query.query(request.toCriteria()).sort(Sort.by("id").descending()); return super.queryWithCache(cacheKey, query, UserAuthority.class) - .flatMap(ContextUtils::serializeUserAuditor); + .flatMapSequential(ContextUtils::serializeUserAuditor); } public Mono operate(UserAuthorityRequest request) {