Showing
3 changed files
with
3 additions
and
22 deletions
@@ -423,7 +423,7 @@ public abstract class AbstractWebTest { | @@ -423,7 +423,7 @@ public abstract class AbstractWebTest { | ||
423 | } | 423 | } |
424 | 424 | ||
425 | protected <T> ResultActions doPost(String urlTemplate, T content, String... params) throws Exception { | 425 | protected <T> ResultActions doPost(String urlTemplate, T content, String... params) throws Exception { |
426 | - MockHttpServletRequestBuilder postRequest = post(urlTemplate); | 426 | + MockHttpServletRequestBuilder postRequest = post(urlTemplate, params); |
427 | setJwtToken(postRequest); | 427 | setJwtToken(postRequest); |
428 | String json = json(content); | 428 | String json = json(content); |
429 | postRequest.contentType(contentType).content(json); | 429 | postRequest.contentType(contentType).content(json); |
@@ -431,7 +431,7 @@ public abstract class AbstractWebTest { | @@ -431,7 +431,7 @@ public abstract class AbstractWebTest { | ||
431 | } | 431 | } |
432 | 432 | ||
433 | protected <T> ResultActions doPostAsync(String urlTemplate, T content, Long timeout, String... params) throws Exception { | 433 | protected <T> ResultActions doPostAsync(String urlTemplate, T content, Long timeout, String... params) throws Exception { |
434 | - MockHttpServletRequestBuilder postRequest = post(urlTemplate); | 434 | + MockHttpServletRequestBuilder postRequest = post(urlTemplate, params); |
435 | setJwtToken(postRequest); | 435 | setJwtToken(postRequest); |
436 | String json = json(content); | 436 | String json = json(content); |
437 | postRequest.contentType(contentType).content(json); | 437 | postRequest.contentType(contentType).content(json); |
@@ -114,6 +114,7 @@ public class BaseEntityService extends AbstractEntityService implements EntitySe | @@ -114,6 +114,7 @@ public class BaseEntityService extends AbstractEntityService implements EntitySe | ||
114 | return this.entityQueryDao.findEntityDataByQuery(tenantId, customerId, query); | 114 | return this.entityQueryDao.findEntityDataByQuery(tenantId, customerId, query); |
115 | } | 115 | } |
116 | 116 | ||
117 | + //TODO: 3.1 Remove this from project. | ||
117 | @Override | 118 | @Override |
118 | public ListenableFuture<String> fetchEntityNameAsync(TenantId tenantId, EntityId entityId) { | 119 | public ListenableFuture<String> fetchEntityNameAsync(TenantId tenantId, EntityId entityId) { |
119 | log.trace("Executing fetchEntityNameAsync [{}]", entityId); | 120 | log.trace("Executing fetchEntityNameAsync [{}]", entityId); |
@@ -182,24 +182,4 @@ public class JpaBaseEventDao extends JpaAbstractDao<EventEntity, Event> implemen | @@ -182,24 +182,4 @@ public class JpaBaseEventDao extends JpaAbstractDao<EventEntity, Event> implemen | ||
182 | return Optional.of(DaoUtil.getData(eventInsertRepository.saveOrUpdate(entity))); | 182 | return Optional.of(DaoUtil.getData(eventInsertRepository.saveOrUpdate(entity))); |
183 | } | 183 | } |
184 | 184 | ||
185 | - private Specification<EventEntity> getEntityFieldsSpec(UUID tenantId, EntityId entityId, String eventType) { | ||
186 | - return (root, criteriaQuery, criteriaBuilder) -> { | ||
187 | - List<Predicate> predicates = new ArrayList<>(); | ||
188 | - if (tenantId != null) { | ||
189 | - Predicate tenantIdPredicate = criteriaBuilder.equal(root.get("tenantId"), tenantId); | ||
190 | - predicates.add(tenantIdPredicate); | ||
191 | - } | ||
192 | - if (entityId != null) { | ||
193 | - Predicate entityTypePredicate = criteriaBuilder.equal(root.get("entityType"), entityId.getEntityType()); | ||
194 | - predicates.add(entityTypePredicate); | ||
195 | - Predicate entityIdPredicate = criteriaBuilder.equal(root.get("entityId"), entityId.getId()); | ||
196 | - predicates.add(entityIdPredicate); | ||
197 | - } | ||
198 | - if (eventType != null) { | ||
199 | - Predicate eventTypePredicate = criteriaBuilder.equal(root.get("eventType"), eventType); | ||
200 | - predicates.add(eventTypePredicate); | ||
201 | - } | ||
202 | - return criteriaBuilder.and(predicates.toArray(new Predicate[]{})); | ||
203 | - }; | ||
204 | - } | ||
205 | } | 185 | } |