瀏覽代碼

处理小程序端店偶查询问题

yjwang 1 周之前
父節點
當前提交
2553213164

+ 2 - 6
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreScrmServiceImpl.java

@@ -286,15 +286,11 @@ public class FsStoreScrmServiceImpl implements IFsStoreScrmService
             FsStoreProductScrm fsStoreProductScrm = new FsStoreProductScrm();
             fsStoreProductScrm.setStoreId(store.getStoreId());
             fsStoreProductScrm.setIsAudit("1");//审核通过
-            fsStoreProductScrm.setIsGood(1);//推荐
+            fsStoreProductScrm.setIsBest(1);//推荐
             fsStoreProductScrm.setIsShow(1);//上架
             fsStoreProductScrm.setIsDel(0);
             List<FsStoreProductScrm> fsStoreProductScrms = fsStoreProduct.selectFsStoreProductList(fsStoreProductScrm);
-            if (fsStoreProductScrms != null && !fsStoreProductScrms.isEmpty()) {
-                return FsStoreRecommendListVO.builder().store(store).recommendProductList(fsStoreProductScrms).build();
-            } else {
-                return null;
-            }
+            return FsStoreRecommendListVO.builder().store(store).recommendProductList(fsStoreProductScrms).build();
         }).collect(Collectors.toList());
     }
 

+ 6 - 6
fs-service/src/main/resources/mapper/hisStore/FsStoreScrmMapper.xml

@@ -346,12 +346,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectFsStoreListByProduct" resultType="com.fs.hisStore.domain.FsStoreScrm">
         select s.*
         from fs_store_scrm s
-        JOIN (
-        SELECT store_id
-        FROM fs_store_product_category_scrm
-        GROUP BY store_id
-        HAVING COUNT(*) > 0
-        ) c ON s.store_id = c.store_id
+--         JOIN (
+--         SELECT store_id
+--         FROM fs_store_product_category_scrm
+--         GROUP BY store_id
+--         HAVING COUNT(*) > 0
+--         ) c ON s.store_id = c.store_id
         <where>
             <if test="storeName != null  and storeName != ''"> and s.store_name like concat('%', #{storeName}, '%')</if>
             <if test="address != null  and address != ''"> and s.address like concat('%', #{address}, '%')</if>