master:系统查询优化;

pull/1121/head
liujiang 2025-11-28 10:27:45 +08:00
parent 6de308f187
commit 61147e3066
1 changed files with 2 additions and 4 deletions

View File

@ -5,20 +5,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.xkt.mapper.StoreProductMapper">
<select id="fuzzyQueryResPicList" resultType="com.ruoyi.xkt.dto.storeProduct.StoreProdFuzzyResPicDTO">
SELECT DISTINCT
SELECT
sp.id AS storeProdId,
sp.store_id AS storeId,
sp.prod_art_num AS prodArtNum,
sf.file_url AS mainPicUrl
FROM
store_product sp
JOIN store_product_file spf ON sp.id = spf.store_prod_id
LEFT JOIN store_product_file spf ON sp.id = spf.store_prod_id AND spf.order_num = 1 AND spf.file_type = 1 AND spf.del_flag = 0
JOIN sys_file sf ON spf.file_id = sf.id
WHERE
sp.del_flag = 0
AND sp.prod_status IN (2,3)
AND spf.order_num = 1
AND spf.file_type = 1
AND sp.store_id = #{storeId}
<if test="prodArtNum != null and prodArtNum != ''">
AND sp.prod_art_num like concat('%', #{prodArtNum}, '%')