|
@@ -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
|