Aslee 2 年 前
コミット
259b7b9f05
1 ファイル変更14 行追加6 行削除
  1. 14 6
      src/main/resources/mapper/BaikeMapper.xml

+ 14 - 6
src/main/resources/mapper/BaikeMapper.xml

@@ -65,12 +65,20 @@
 		where productId = #{productId}
 	</select>
 	<select id="getManualRecommendList" resultType="com.caimei.www.pojo.baike.BaikeProduct">
-		select p.id as productId, p.commodityType, p.image, p.name, p.discription, p.publishTime, (p.basePv + p.actualPv) as pv
-		from cm_baike_product_recommend cbpr
-				 left join cm_baike_product p on cbpr.recommendProductId = p.id
-		where productId = #{productId}
-		  and p.delFlag = 0
-		order by -cbpr.sort desc
+        select p.id                    as productId,
+               p.commodityType,
+               p.image,
+               p.name,
+               p.discription,
+               p.publishTime,
+               (p.basePv + p.actualPv) as pv
+        from cm_baike_product_recommend cbpr
+                 left join cm_baike_product p on cbpr.recommendProductId = p.id
+        where productId = #{productId}
+          and p.delFlag = 0
+          and p.onlineStatus = 2
+          and p.status = 1
+        order by -cbpr.sort desc;
 	</select>
 	<select id="getAutoRecommendList" resultType="com.caimei.www.pojo.baike.BaikeProduct">
 		select p.id as productId, p.commodityType, p.image, p.name, p.discription, p.publishTime, (p.basePv + p.actualPv) as pv