Skip to content

Commit

Permalink
✨ feat: 添加了UserAuthoritiesService, MenusService, GroupMembersService,…
Browse files Browse the repository at this point in the history
… TenantMembersService, GroupAuthoritiesService, TenantsService, GroupsService文件。
  • Loading branch information
vnobo committed May 31, 2024
1 parent f0eab43 commit 0cbb409
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Flux<Menu> 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<Menu> add(MenuRequest request) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public Flux<Group> 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<Group>> page(GroupRequest request, Pageable pageable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public Flux<GroupAuthority> 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -37,7 +38,8 @@ public Flux<GroupMemberResponse> 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<GroupMemberResponse>> page(GroupMemberRequest request, Pageable pageable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public Flux<Tenant> 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<Tenant>> page(TenantRequest request, Pageable pageable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -40,7 +41,8 @@ public Flux<TenantMemberResponse> 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<TenantMemberResponse>> page(TenantMemberRequest request, Pageable pageable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public Flux<UserAuthority> 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<UserAuthority> operate(UserAuthorityRequest request) {
Expand Down

0 comments on commit 0cbb409

Please sign in to comment.