<
select
id=
"homePageList"
parameterClass=
"java.util.Map"
resultClass=
"java.util.HashMap"
>
SELECT
v.`attribute_id`
AS
attributeId,
o.attribute_option_id
AS
attributeOptionId,
TRIM(ol.`attribute_option_name`)
AS
attributeOptionName,
v.`value_name`
AS
valueName,
r.`value_key`
AS
valueKey,
l.`value_content`
AS
valueContent
FROM
cosplay_display d
JOIN
t_attribute_option o
ON
d.option_id = o.attribute_option_id
AND
o.data_status = 0
JOIN
t_attribute_option_lang ol
ON
o.attribute_option_id = ol.attribute_option_id
AND
ol.data_status = 0
AND
ol.`language_id` = #languageId#
JOIN
product_attribute_function_value v
ON
o.`product_attribute_id` = v.`attribute_id`
AND
o.attribute_option_id = v.option_id
AND
v.data_status = 0
AND
v.value_name
IS
NOT
NULL
JOIN
product_attribute_function_value_lang l
ON
l.value_id = v.id
AND
l.data_status = 0
AND
l.value_content
IS
NOT
NULL
AND
l.`language_id` = 1
JOIN
product_attribute_function_rule r
ON
r.`id` = v.`rule_id`
AND
r.`data_status` = 0
<isNotEmpty prepend=
"and"
property=
"key"
>
r.`value_key` = #
key
#
</isNotEmpty>
WHERE
d.data_status = 0
AND
d.display_type = #displayType#
ORDER
BY
d.`sort`
LIMIT #returnNum#
</
select
>