master:商城档口首页,当jumpType为3,且没有设置商品图片时,默认返回当前商品第一张主图;
parent
11601c7caa
commit
8fb29a2ed3
|
|
@ -5,11 +5,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<mapper namespace="com.ruoyi.xkt.mapper.StoreHomepageMapper">
|
<mapper namespace="com.ruoyi.xkt.mapper.StoreHomepageMapper">
|
||||||
|
|
||||||
<select id="selectTopLeftList">
|
<select id="selectTopLeftList">
|
||||||
SELECT DISTINCT
|
SELECT
|
||||||
sh.biz_id,
|
sh.biz_id,
|
||||||
sh.jump_type,
|
sh.jump_type,
|
||||||
sf.file_url,
|
sh.order_num,
|
||||||
sh.order_num
|
CASE WHEN sh.jump_type = 3 AND sh.file_id IS NULL THEN
|
||||||
|
(SELECT sf1.file_url FROM store_product_file spf JOIN sys_file sf1 ON spf.file_id = sf1.id AND spf.file_type = 1 AND spf.order_num = 1
|
||||||
|
WHERE spf.del_flag = 0 AND spf.store_prod_id = sh.biz_id)
|
||||||
|
ELSE sf.file_url
|
||||||
|
END AS file_url
|
||||||
FROM
|
FROM
|
||||||
store_homepage sh
|
store_homepage sh
|
||||||
LEFT JOIN sys_file sf ON sh.file_id = sf.id
|
LEFT JOIN sys_file sf ON sh.file_id = sf.id
|
||||||
|
|
@ -17,6 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
sh.del_flag = 0
|
sh.del_flag = 0
|
||||||
AND sh.file_type = 1
|
AND sh.file_type = 1
|
||||||
AND sh.store_id = #{storeId}
|
AND sh.store_id = #{storeId}
|
||||||
|
ORDER BY
|
||||||
|
sh.order_num
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue