Skip to content
Snippets Groups Projects
Commit ce03d4ca authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-6710 Update common-lib' (#128) from OZG-6710-update-common-lib into master

parents bb4f77b1 21d70af4
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<parent> <parent>
<groupId>de.ozgcloud.common</groupId> <groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-dependencies</artifactId> <artifactId>ozgcloud-common-dependencies</artifactId>
<version>4.3.2</version> <version>4.5.0-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -92,13 +92,14 @@ ...@@ -92,13 +92,14 @@
<goal>run</goal> <goal>run</goal>
</goals> </goals>
<configuration> <configuration>
<protocVersion>${protobuf.version}</protocVersion>
<outputTargets> <outputTargets>
<outputTarget> <outputTarget>
<type>java</type> <type>java</type>
</outputTarget> </outputTarget>
<outputTarget> <outputTarget>
<type>grpc-java</type> <type>grpc-java</type>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.60.0</pluginArtifact> <pluginArtifact>io.grpc:protoc-gen-grpc-java:${protoc-gen.version}</pluginArtifact>
</outputTarget> </outputTarget>
</outputTargets> </outputTargets>
</configuration> </configuration>
......
...@@ -96,7 +96,7 @@ class UserRepository implements PanacheMongoRepository<User> { ...@@ -96,7 +96,7 @@ class UserRepository implements PanacheMongoRepository<User> {
public Stream<User> findUsersByDeleted(String query, boolean deleted, int limit) { public Stream<User> findUsersByDeleted(String query, boolean deleted, int limit) {
var params = Parameters.with(PARAM_NAME_SEARCH_BY, toRegex(query)).and(PARAM_NAME_DELETED, deleted); var params = Parameters.with(PARAM_NAME_SEARCH_BY, toRegex(query)).and(PARAM_NAME_DELETED, deleted);
return find(SEARCH_QUERY + AND_DELETED, params).range(0, limit - 1).stream(); return find("(" + SEARCH_QUERY + ")" + AND_DELETED, params).range(0, limit - 1).stream();
} }
public Stream<User> findUsersByDeletedAndOrganisationsEinheitId(String query, boolean deleted, String organisationsEinheitId, int limit) { public Stream<User> findUsersByDeletedAndOrganisationsEinheitId(String query, boolean deleted, String organisationsEinheitId, int limit) {
...@@ -104,7 +104,7 @@ class UserRepository implements PanacheMongoRepository<User> { ...@@ -104,7 +104,7 @@ class UserRepository implements PanacheMongoRepository<User> {
.and(PARAM_NAME_DELETED, deleted) .and(PARAM_NAME_DELETED, deleted)
.and(PARAM_NAME_ORGANISATIONS_EINHEIT_ID, organisationsEinheitId); .and(PARAM_NAME_ORGANISATIONS_EINHEIT_ID, organisationsEinheitId);
return find(SEARCH_QUERY + AND_DELETED + AND_ORGANISATIONS_EINHEIT_ID_IN, params).range(0, limit - 1).stream(); return find("(" + SEARCH_QUERY + ")" + AND_DELETED + AND_ORGANISATIONS_EINHEIT_ID_IN, params).range(0, limit - 1).stream();
} }
String toRegex(String query) { String toRegex(String query) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment