quota: fixed permisison and date flip

This commit is contained in:
Abhinandan Prateek 2015-07-29 19:34:14 +05:30
parent 7c4c67b520
commit 2f7ebc7c54
2 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ public class QuotaBalanceCmd extends BaseCmd {
@Override
public long getEntityOwnerId() {
Long accountId = _accountService.finalyzeAccountId(accountName, domainId, null, true);
Long accountId = _accountService.getActiveAccountByName(accountName, domainId).getAccountId();
if (accountId == null) {
return CallContext.current().getCallingAccount().getId();
}

View File

@ -174,7 +174,7 @@ public class QuotaServiceImpl extends ManagerBase implements QuotaService, Confi
} else if (endDate.after(startOfNextDay(new Date()))) {
throw new InvalidParameterValueException("Incorrect Date Range. End date:" + endDate + " should not be in future. ");
} else if (startDate.before(endDate)) {
Date adjustedEndDate = startOfNextDay(endDate);
Date adjustedEndDate = computeAdjustedTime(startOfNextDay(endDate));
s_logger.debug("Getting quota balance records for account: " + accountId + ", domainId: " + domainId + ", between " + adjustedStartDate + " and " + adjustedEndDate);
List<QuotaBalanceVO> qbrecords = _quotaBalanceDao.findQuotaBalance(accountId, domainId, adjustedStartDate, adjustedEndDate);
s_logger.info("Found records size=" + qbrecords.size());