META-INF.custom-sql.default.xml Maven / Gradle / Ivy
The newest version!
<?xml version="1.0"?> <custom-sql> <sql id="com.liferay.commerce.service.persistence.CommerceOrderFinder.findByG_O"> <![CDATA[ SELECT CommerceOrder.* FROM CommerceOrder INNER JOIN CommerceOrderItem ON CommerceOrderItem.commerceOrderId = CommerceOrder.commerceOrderId WHERE (CommerceOrder.groupId = ?) AND (CommerceOrder.orderStatus IN ([$ORDER_STATUS$])) AND (CommerceOrderItem.quantity > CommerceOrderItem.shippedQuantity) ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceOrderFinder.findByG_U_C_O_S"> <![CDATA[ SELECT CommerceOrder.* FROM CommerceOrder WHERE (CommerceOrder.groupId = ?) AND (CommerceOrder.commerceAccountId = ?) AND (CommerceOrder.orderStatus = ?) AND ( ( (CommerceOrder.userId = ?) AND (CommerceOrder.status != 0) ) OR (CommerceOrder.status = 0) ) ORDER BY CommerceOrder.modifieddate DESC ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceOrderFinder.getShippedCommerceOrdersByCommerceShipmentId"> <![CDATA[ SELECT CommerceOrder.* FROM CommerceOrder WHERE CommerceOrder.commerceOrderId IN ( SELECT DISTINCT CommerceOrderItem.commerceOrderId FROM CommerceOrderItem JOIN CommerceShipmentItem ON CommerceShipmentItem.commerceOrderItemId = CommerceOrderItem.commerceOrderItemId JOIN CommerceShipment ON CommerceShipment.commerceShipmentId = CommerceShipmentItem.commerceShipmentId WHERE (CommerceShipment.commerceShipmentId = ?) AND (CommerceShipment.status > 1) ) ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceOrderItemFinder.countByG_A_O"> <![CDATA[ SELECT COUNT(CommerceOrderItem.commerceOrderItemId) AS COUNT_VALUE FROM CommerceOrderItem INNER JOIN CommerceOrder ON CommerceOrder.commerceOrderId = CommerceOrderItem.commerceOrderId WHERE (CommerceOrder.commerceAccountId = ?) AND (CommerceOrder.groupId = ?) AND (CommerceOrder.orderStatus IN ([$ORDER_STATUS$])) AND (CommerceOrderItem.shippedQuantity < CommerceOrderItem.quantity) ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceOrderItemFinder.findByAvailableQuantity"> <![CDATA[ SELECT CommerceOrderItem.* FROM CommerceOrderItem WHERE (CommerceOrderItem.commerceOrderId = ?) AND (CommerceOrderItem.quantity > CommerceOrderItem.shippedQuantity) ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceOrderItemFinder.findByG_A_O"> <![CDATA[ SELECT CommerceOrderItem.* FROM CommerceOrderItem INNER JOIN CommerceOrder ON CommerceOrder.commerceOrderId = CommerceOrderItem.commerceOrderId WHERE (commerceAccountId = ?) AND (CommerceOrderItem.groupId = ?) AND (CommerceOrder.orderStatus IN ([$ORDER_STATUS$])) AND (CommerceOrderItem.shippedQuantity < CommerceOrderItem.quantity) ORDER BY CommerceOrderItem.sku ASC, CommerceOrderItem.commerceOrderId ASC ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceOrderItemFinder.getCommerceOrderItemsQuantity"> <![CDATA[ SELECT SUM(CommerceOrderItem.quantity) AS SUM_VALUE FROM CommerceOrderItem WHERE (CommerceOrderItem.commerceOrderId = ?) AND (CommerceOrderItem.parentCommerceOrderItemId = 0) ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceOrderItemFinder.getCPInstanceQuantity"> <![CDATA[ SELECT SUM(CommerceOrderItem.quantity) AS SUM_VALUE FROM CommerceOrderItem INNER JOIN CommerceOrder ON CommerceOrderItem.commerceOrderId = CommerceOrder.commerceOrderId LEFT JOIN CommerceShipmentItem ON CommerceShipmentItem.commerceOrderItemId = CommerceOrderItem.commerceOrderItemId WHERE (CommerceOrderItem.CPInstanceId = ?) AND (CommerceShipmentItem.commerceOrderItemId IS NULL) AND (CommerceOrder.status <> ?) ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceShipmentFinder.countByCommerceOrderId"> <![CDATA[ SELECT COUNT(CommerceShipment.commerceShipmentId) AS COUNT_VALUE FROM CommerceShipment LEFT JOIN CommerceShipmentItem ON CommerceShipmentItem.commerceShipmentId = CommerceShipment.commerceShipmentId INNER JOIN CommerceOrderItem ON CommerceOrderItem.commerceOrderItemId = CommerceShipmentItem.commerceOrderItemId WHERE CommerceOrderItem.commerceOrderId = ? ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceShipmentFinder.findByCommerceOrderId"> <![CDATA[ SELECT {CommerceShipment.*} FROM CommerceShipment LEFT JOIN CommerceShipmentItem ON CommerceShipmentItem.commerceShipmentId = CommerceShipment.commerceShipmentId INNER JOIN CommerceOrderItem ON CommerceOrderItem.commerceOrderItemId = CommerceShipmentItem.commerceOrderItemId WHERE CommerceOrderItem.commerceOrderId = ? ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceShipmentFinder.findCommerceShipmentStatusesByCommerceOrderId"> <![CDATA[ SELECT DISTINCT CommerceShipment.status FROM CommerceShipment LEFT JOIN CommerceShipmentItem ON CommerceShipmentItem.commerceShipmentId = CommerceShipment.commerceShipmentId INNER JOIN CommerceOrderItem ON CommerceOrderItem.commerceOrderItemId = CommerceShipmentItem.commerceOrderItemId WHERE CommerceOrderItem.commerceOrderId = ? ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceShipmentItemFinder.findByCommerceOrderItemId"> <![CDATA[ SELECT CommerceShipmentItem.* FROM CommerceShipmentItem INNER JOIN CommerceOrderItem ON CommerceOrderItem.commerceOrderItemId = CommerceShipmentItem.commerceOrderItemId WHERE CommerceOrderItem.commerceOrderItemId = ? ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceShipmentItemFinder.getCommerceShipmentOrderItemsQuantity"> <![CDATA[ SELECT SUM(CommerceShipmentItem.quantity) AS SUM_VALUE FROM CommerceShipmentItem WHERE (CommerceShipmentItem.commerceShipmentId = ?) AND (CommerceShipmentItem.commerceOrderItemId = ?) ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceSubscriptionEntryFinder.findByDeliveryNextIterationDate"> <![CDATA[ SELECT CommerceSubscriptionEntry.* FROM CommerceSubscriptionEntry WHERE (CommerceSubscriptionEntry.deliveryNextIterationDate IS NOT NULL) AND (CommerceSubscriptionEntry.deliveryNextIterationDate < ?) AND (CommerceSubscriptionEntry.deliverySubscriptionStatus = 0) ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceSubscriptionEntryFinder.findByNextIterationDate"> <![CDATA[ SELECT CommerceSubscriptionEntry.* FROM CommerceSubscriptionEntry WHERE (CommerceSubscriptionEntry.nextIterationDate IS NOT NULL) AND (CommerceSubscriptionEntry.nextIterationDate < ?) AND (CommerceSubscriptionEntry.subscriptionStatus = 0) ]]> </sql> <sql id="com.liferay.commerce.service.persistence.CommerceSubscriptionEntryFinder.findByA_S"> <![CDATA[ SELECT CommerceSubscriptionEntry.* FROM CommerceSubscriptionEntry INNER JOIN CommerceOrderItem ON CommerceOrderItem.commerceOrderItemId = CommerceSubscriptionEntry.commerceOrderItemId INNER JOIN CommerceOrder ON CommerceOrder.commerceOrderId = CommerceOrderItem.commerceOrderId WHERE (CommerceOrder.commerceAccountId = ?) AND (CommerceSubscriptionEntry.subscriptionStatus = ?) ]]> </sql> </custom-sql>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy