mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-8592: fix sort order for tariff
This commit is contained in:
parent
298924d519
commit
677564f7ee
|
|
@ -59,7 +59,7 @@ public class QuotaTariffDaoImpl extends GenericDaoBase<QuotaTariffVO, Long> impl
|
|||
final short opendb = TransactionLegacy.currentTxn().getDatabaseId();
|
||||
List<QuotaTariffVO> result = new ArrayList<>();
|
||||
try (TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB)) {
|
||||
final Filter filter = new Filter(QuotaTariffVO.class, "effectiveOn", false, 0L, 1L);
|
||||
final Filter filter = new Filter(QuotaTariffVO.class, "updatedOn", false, 0L, 1L);
|
||||
final SearchCriteria<QuotaTariffVO> sc = listAllIncludedUsageType.create();
|
||||
sc.setParameters("onorbefore", effectiveDate);
|
||||
sc.setParameters("quotatype", quotaType);
|
||||
|
|
@ -103,7 +103,7 @@ public class QuotaTariffDaoImpl extends GenericDaoBase<QuotaTariffVO, Long> impl
|
|||
final short opendb = TransactionLegacy.currentTxn().getDatabaseId();
|
||||
List<QuotaTariffVO> tariffs = new ArrayList<QuotaTariffVO>();
|
||||
try (TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB)) {
|
||||
final Filter filter = new Filter(QuotaTariffVO.class, "effectiveOn", false, 0L, 1L);
|
||||
final Filter filter = new Filter(QuotaTariffVO.class, "updatedOn", false, 0L, 1L);
|
||||
final SearchCriteria<QuotaTariffVO> sc = listAllIncludedUsageType.create();
|
||||
sc.setParameters("onorbefore", effectiveDate);
|
||||
for (Integer quotaType : QuotaTypes.listQuotaTypes().keySet()) {
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ public class QuotaServiceImpl extends ManagerBase implements QuotaService, Confi
|
|||
if (_domainDao.isChildDomain(caller.getDomainId(), domainId)) {
|
||||
Filter filter = new Filter(AccountVO.class, "id", Boolean.FALSE, null, null);
|
||||
List<AccountVO> accounts = _accountDao.listAccounts(accountName, domainId, filter);
|
||||
if (accounts.size() > 0) {
|
||||
if (!accounts.isEmpty()) {
|
||||
userAccount = accounts.get(0);
|
||||
}
|
||||
if (userAccount != null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue