Ver Fonte

联合丽格1.0.2

huangzhiguo há 1 ano atrás
pai
commit
16780ac5d8
1 ficheiros alterados com 5 adições e 7 exclusões
  1. 5 7
      src/main/resources/mapper/ShopMapper.xml

+ 5 - 7
src/main/resources/mapper/ShopMapper.xml

@@ -546,13 +546,11 @@
         where shopID = #{shopId}
     </select>
     <select id="getMainProductsCount" resultType="java.lang.Integer">
-        select count(*)
-        from product p
-        left join cm_organize_product_info copi on copi.productId = p.productId
-        where p.shopID = #{shopId}
-          and copi.validFlag = '2'
-          and p.featuredFlag = '1'
-        order by p.productID desc
+        select count(distinct productId)
+        from product
+        where shopID = #{shopId}
+          and featuredFlag = '1'
+        order by productID desc
     </select>
     <select id="getCodeByTypeId" resultType="java.lang.String">
         select