From cbc47d14e43cb5654198306cfd1a68320a388fac Mon Sep 17 00:00:00 2001 From: liyj <1617420630@qq.com> Date: Thu, 18 Dec 2025 16:23:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E6=9D=A1=E7=A0=81=E5=8C=B9?= =?UTF-8?q?=E9=85=8D=E8=A1=A5=E5=85=A8=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/product/ShopProductImageMapper.xml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mall-shop/src/main/resources/mapper/product/ShopProductImageMapper.xml b/mall-shop/src/main/resources/mapper/product/ShopProductImageMapper.xml index 10d0e652..67b3ca2a 100644 --- a/mall-shop/src/main/resources/mapper/product/ShopProductImageMapper.xml +++ b/mall-shop/src/main/resources/mapper/product/ShopProductImageMapper.xml @@ -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' '' ]]>)t )temp where - temp.rn = 1 and temp.store_id=#{storeId} + temp.rn = 1 )tt @@ -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' '' ]]>)t )temp where - temp.rn = 1 and temp.store_id=#{storeId} limit #{offset},#{limit} + temp.rn = 1 limit #{offset},#{limit}