瀏覽代碼

联合丽格1.0.2

huangzhiguo 1 年之前
父節點
當前提交
16780ac5d8
共有 1 個文件被更改,包括 5 次插入7 次删除
  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