修改getImgServices的子查询sql语句为兼容mysql5.7

This commit is contained in:
yitonglei 2022-08-22 09:01:26 +08:00
parent b428b74e90
commit 26ee20e34c
1 changed files with 17 additions and 13 deletions

View File

@ -1631,7 +1631,8 @@
</select>
<select id="getImgServices" resultType="java.util.Map">
with A as
SELECT A.*,IFNULL(c.attr_value,'') as link
FROM
(
SELECT m.* FROM
(
@ -1641,9 +1642,12 @@
) m
INNER JOIN tb_data_attr b ON m.id = b.data_resource_id
AND b.attr_type = '分类' AND LOCATE(#{type},b.attr_value) AND b.del_flag = 0
)
SELECT A.*,IFNULL(c.attr_value,'') as link FROM A LEFT JOIN tb_data_attr c ON A.id = c.data_resource_id
AND c.attr_type = '图层缩略图' AND c.del_flag = 0
) A
LEFT JOIN tb_data_attr c
ON A.id = c.data_resource_id
AND c.attr_type = '图层缩略图'
AND c.del_flag = 0
</select>
<select id="cimAssemblyResources" resultType="java.util.Map">