winterhazel commented on code in PR #13449:
URL: https://github.com/apache/cloudstack/pull/13449#discussion_r3562241875


##########
framework/quota/src/main/java/org/apache/cloudstack/quota/dao/QuotaCreditsDaoImpl.java:
##########
@@ -50,19 +47,18 @@ public QuotaCreditsDaoImpl() {
         quotaCreditsVoSearch = createSearchBuilder();
         quotaCreditsVoSearch.and("updatedOn", 
quotaCreditsVoSearch.entity().getUpdatedOn(), SearchCriteria.Op.BETWEEN);
         quotaCreditsVoSearch.and("accountId", 
quotaCreditsVoSearch.entity().getAccountId(), SearchCriteria.Op.EQ);
-        quotaCreditsVoSearch.and("domainId", 
quotaCreditsVoSearch.entity().getDomainId(), SearchCriteria.Op.IN);
+        quotaCreditsVoSearch.and("domainIds", 
quotaCreditsVoSearch.entity().getDomainId(), SearchCriteria.Op.IN);
         quotaCreditsVoSearch.done();
     }
 
     @Override
-    public List<QuotaCreditsVO> findCredits(Long accountId, Long domainId, 
Date startDate, Date endDate, boolean recursive) {
+    public List<QuotaCreditsVO> findCredits(Long accountId, List<Long> 
domainIds, Date startDate, Date endDate) {
         SearchCriteria<QuotaCreditsVO> sc = quotaCreditsVoSearch.create();
         Filter filter = new Filter(QuotaCreditsVO.class, "updatedOn", true, 
0L, Long.MAX_VALUE);
 
         sc.setParametersIfNotNull("accountId", accountId);
-        if (domainId != null) {
-            List<Long> domainIds = recursive ? 
domainDao.getDomainAndChildrenIds(domainId) : List.of(domainId);
-            sc.setParameters("domainId", domainIds.toArray());

Review Comment:
   No, because `domainIds` is a `List`. It needs to be converted to an array.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to