商品条码匹配补全问题修复

This commit is contained in:
liyj 2025-12-18 16:23:33 +08:00
parent 59274f9941
commit cbc47d14e4

View File

@ -42,13 +42,14 @@
from
(
SELECT
ROW_NUMBER() over(partition by t.product_name order by t.id) rn,t.*
ROW_NUMBER() over(partition by t.product_number order by t.id) rn,t.*
from
(
SELECT
spi.product_image_id,
spi.product_id,
spi.product_name,
spi.product_number,
spi.store_id,
lpi. merged_image_url,
lp.thumb,
@ -74,11 +75,12 @@
lp.id = lpi.product_id
WHERE
spi.product_from = '1005'
AND spi.store_id=#{storeId}
AND spi.item_image_default = '1'
<![CDATA[ AND lp.barcode <> '' ]]>)t
)temp
where
temp.rn = 1 and temp.store_id=#{storeId}
temp.rn = 1
)tt
</select>
@ -93,13 +95,14 @@
from
(
SELECT
ROW_NUMBER() over(partition by t.product_name order by t.id) rn,t.*
ROW_NUMBER() over(partition by t.product_number order by t.id) rn,t.*
from
(
SELECT
spi.product_image_id,
spi.product_id,
spi.product_name,
spi.product_number,
spi.store_id,
lpi. merged_image_url,
lp.thumb,
@ -125,11 +128,12 @@
lp.id = lpi.product_id
WHERE
spi.product_from = '1005'
AND spi.store_id=#{storeId}
AND spi.item_image_default = '1'
<![CDATA[ AND lp.barcode <> '' ]]>)t
)temp
where
temp.rn = 1 and temp.store_id=#{storeId} limit #{offset},#{limit}
temp.rn = 1 limit #{offset},#{limit}
</sql>
<select id="mappingByProductShortNameCount" resultType="java.lang.Integer">