All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.custom-sql.default.xml Maven / Gradle / Ivy

<?xml version="1.0"?>

<custom-sql>
	<sql id="com.liferay.commerce.price.list.service.persistence.CommercePriceListFinder.findByExpirationDate">
		<![CDATA[
			SELECT
				CommercePriceList.*
			FROM
				CommercePriceList
			WHERE
				(CommercePriceList.expirationDate < ?) AND
				(CommercePriceList.expirationDate IS NOT NULL) AND
				([$OWNER_USER_ID$] [$OWNER_USER_ID_AND_OR_CONNECTOR$] ([$STATUS$]))
		]]>
	</sql>
	<sql id="com.liferay.commerce.price.list.service.persistence.CommercePriceListFinder.findByCommerceAccountId">
		<![CDATA[
			SELECT
				CommercePriceList.*
			FROM
				CommercePriceListAccountRel
			INNER JOIN
				CommercePriceList ON
					CommercePriceListAccountRel.commercePriceListId = CommercePriceList.commercePriceListId
			WHERE
				(CommercePriceListAccountRel.commerceAccountId = ?) AND
				(CommercePriceList.groupId = ?) AND
				(CommercePriceList.type_ = ?) AND
				(CommercePriceList.status = 0)
			ORDER BY
				CommercePriceList.priority DESC
		]]>
	</sql>
	<sql id="com.liferay.commerce.price.list.service.persistence.CommercePriceListFinder.findByAccountAndChannelId">
		<![CDATA[
			SELECT
				CommercePriceList.*
			FROM
				CommercePriceListChannelRel
			INNER JOIN
				CommercePriceListAccountRel ON
					CommercePriceListChannelRel.commercePriceListId = CommercePriceListAccountRel.commercePriceListId
			INNER JOIN
				CommercePriceList ON
					CommercePriceListAccountRel.commercePriceListId = CommercePriceList.commercePriceListId
			WHERE
				(CommercePriceListChannelRel.commerceChannelId = ?) AND
				(CommercePriceListAccountRel.commerceAccountId = ?) AND
				(CommercePriceList.groupId = ?) AND
				(CommercePriceList.type_ = ?) AND
				(CommercePriceList.status = 0)
			ORDER BY
				CommercePriceList.priority DESC
		]]>
	</sql>
	<sql id="com.liferay.commerce.price.list.service.persistence.CommercePriceListFinder.findByCommerceAccountGroupIds">
		<![CDATA[
			SELECT
				CommercePriceList.*
			FROM
				CPLCommerceGroupAccountRel
			INNER JOIN
				CommercePriceList ON
					CPLCommerceGroupAccountRel.commercePriceListId = CommercePriceList.commercePriceListId
			WHERE
				(CPLCommerceGroupAccountRel.commerceAccountGroupId IN ([$ACCOUNT_GROUP_IDS$])) AND
				(CommercePriceList.groupId = ?) AND
				(CommercePriceList.type_ = ?) AND
				(CommercePriceList.status = 0)
			ORDER BY
				CommercePriceList.priority DESC
		]]>
	</sql>
	<sql id="com.liferay.commerce.price.list.service.persistence.CommercePriceListFinder.findByAccountGroupsAndChannelId">
		<![CDATA[
			SELECT
				CommercePriceList.*
			FROM
				CommercePriceListChannelRel
			INNER JOIN
				CPLCommerceGroupAccountRel ON
					CommercePriceListChannelRel.commercePriceListId = CPLCommerceGroupAccountRel.commercePriceListId
			INNER JOIN
				CommercePriceList ON
					CPLCommerceGroupAccountRel.commercePriceListId = CommercePriceList.commercePriceListId
			WHERE
				(CommercePriceListChannelRel.commerceChannelId = ?) AND
				(CPLCommerceGroupAccountRel.commerceAccountGroupId IN ([$ACCOUNT_GROUP_IDS$])) AND
				(CommercePriceList.groupId = ?) AND
				(CommercePriceList.type_ = ?) AND
				(CommercePriceList.status = 0)
			ORDER BY
				CommercePriceList.priority DESC
		]]>
	</sql>
	<sql id="com.liferay.commerce.price.list.service.persistence.CommercePriceListFinder.findByCommerceChannelId">
		<![CDATA[
			SELECT
				CommercePriceList.*
			FROM
				CommercePriceListChannelRel
			INNER JOIN
				CommercePriceList ON
					CommercePriceListChannelRel.commercePriceListId = CommercePriceList.commercePriceListId
			WHERE
				(CommercePriceListChannelRel.commerceChannelId = ?) AND
				(CommercePriceList.groupId = ?) AND
				(CommercePriceList.type_ = ?) AND
				(CommercePriceList.status = 0)
			ORDER BY
				CommercePriceList.priority DESC
		]]>
	</sql>
	<sql id="com.liferay.commerce.price.list.service.persistence.CommercePriceListFinder.findByUnqualified">
		<![CDATA[
			SELECT
				CommercePriceList.*
			FROM
				CommercePriceList
			LEFT JOIN
				CommercePriceListAccountRel ON
					CommercePriceListAccountRel.commercePriceListId = CommercePriceList.commercePriceListId
			LEFT JOIN
				CPLCommerceGroupAccountRel ON
					CPLCommerceGroupAccountRel.commercePriceListId = CommercePriceList.commercePriceListId
			LEFT JOIN
				CommercePriceListChannelRel ON
					CommercePriceListChannelRel.commercePriceListId = CommercePriceList.commercePriceListId
			WHERE
				(CommercePriceList.groupId = ?) AND
				(CommercePriceList.type_ = ?) AND
				(CommercePriceList.status = 0) AND
				(CommercePriceListAccountRel.commercePriceListAccountRelId IS NULL) AND
				(CPLCommerceGroupAccountRel.cPLCommerceAccountGroupRelId IS NULL) AND
				(CommercePriceListChannelRel.commercePriceListChannelRelId IS NULL)
			ORDER BY
				CommercePriceList.priority DESC,
				CommercePriceList.catalogBasePriceList ASC
		]]>
	</sql>
	<sql id="com.liferay.commerce.price.list.service.persistence.CommercePriceListFinder.findByLowestPrice">
		<![CDATA[
			SELECT
				CommercePriceEntry.*
			FROM
				CommercePriceEntry
			INNER JOIN
				CommercePriceList ON
					CommercePriceList.commercePriceListId = CommercePriceEntry.commercePriceListId
			LEFT JOIN
				CommercePriceListAccountRel ON
					CommercePriceListAccountRel.commercePriceListId = CommercePriceList.commercePriceListId
			LEFT JOIN
				CPLCommerceGroupAccountRel ON
					CPLCommerceGroupAccountRel.commercePriceListId = CommercePriceList.commercePriceListId
			LEFT JOIN
				CommercePriceListChannelRel ON
					CommercePriceListChannelRel.commercePriceListId = CommercePriceList.commercePriceListId
			WHERE
				(CommercePriceEntry.CPInstanceUuid = ?) AND
				(CommercePriceEntry.status = 0) AND
				(CommercePriceList.groupId = ?) AND
				(CommercePriceList.type_ = ?) AND
				(CommercePriceList.status = 0) AND
				(
					(CommercePriceListAccountRel.commerceAccountId = ?) OR
					(CommercePriceListAccountRel.commercePriceListAccountRelId IS NULL)
				) AND
				(
					(CPLCommerceGroupAccountRel.commerceAccountGroupId = ([$ACCOUNT_GROUP_IDS$])) OR
					(CPLCommerceGroupAccountRel.cPLCommerceAccountGroupRelId IS NULL)
				) AND
				(
					(CommercePriceListChannelRel.commerceChannelId = ?) OR
					(CommercePriceListChannelRel.commercePriceListChannelRelId IS NULL)
				)
			ORDER BY
				CommercePriceEntry.price ASC
		]]>
	</sql>
</custom-sql>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy