|
@@ -79,6 +79,9 @@
|
|
<if test="productName != null and productName != ''">
|
|
<if test="productName != null and productName != ''">
|
|
and p.name like concat('%', #{productName},'%')
|
|
and p.name like concat('%', #{productName},'%')
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="status != null">
|
|
|
|
+ and csp.status = #{status}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
order by csp.addTime desc
|
|
order by csp.addTime desc
|
|
</select>
|
|
</select>
|
|
@@ -465,8 +468,9 @@
|
|
IFNULL((IFNULL(SUM(cpsi.accessDuration), 0) / IFNULL(SUM(cpsi.accessNumber), 0)), 0) AS averageDuration
|
|
IFNULL((IFNULL(SUM(cpsi.accessDuration), 0) / IFNULL(SUM(cpsi.accessNumber), 0)), 0) AS averageDuration
|
|
FROM cm_page_shop_info cpsi
|
|
FROM cm_page_shop_info cpsi
|
|
LEFT JOIN info i ON i.id = cpsi.infoId
|
|
LEFT JOIN info i ON i.id = cpsi.infoId
|
|
- left join cm_shop_statistics css on css.shopId = cpsi.shopId
|
|
|
|
- left join cm_shop_product csp on csp.statisticsId = css.id
|
|
|
|
|
|
+ LEFT JOIN cm_shop_info csi ON csi.infoId = cpsi.infoId
|
|
|
|
+ LEFT JOIN cm_shop_product csp ON csp.id = csi.shopProductId
|
|
|
|
+ LEFT JOIN cm_shop_statistics css ON css.id = csp.statisticsId
|
|
left join product p on p.productId = csp.productId
|
|
left join product p on p.productId = csp.productId
|
|
WHERE cpsi.shopId = #{shopId}
|
|
WHERE cpsi.shopId = #{shopId}
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
@@ -492,8 +496,9 @@
|
|
IFNULL((IFNULL(SUM(cpsk.accessDuration), 0) / IFNULL(SUM(cpsk.accessNumber), 0)), 0) AS averageDuration
|
|
IFNULL((IFNULL(SUM(cpsk.accessDuration), 0) / IFNULL(SUM(cpsk.accessNumber), 0)), 0) AS averageDuration
|
|
FROM cm_page_shop_keyword cpsk
|
|
FROM cm_page_shop_keyword cpsk
|
|
LEFT JOIN cm_user_search_frequency cusf ON cusf.id = cpsk.searchId
|
|
LEFT JOIN cm_user_search_frequency cusf ON cusf.id = cpsk.searchId
|
|
- left join cm_shop_statistics css on css.shopId = cpsk.shopId
|
|
|
|
- left join cm_shop_product csp on csp.statisticsId = css.id
|
|
|
|
|
|
+ LEFT JOIN cm_shop_keyword csk ON csk.searchId = cpsk.searchId
|
|
|
|
+ LEFT JOIN cm_shop_product csp ON csp.id = csk.shopProductId
|
|
|
|
+ LEFT JOIN cm_shop_statistics css ON css.id = csp.statisticsId
|
|
left join product p on p.productId = csp.productId
|
|
left join product p on p.productId = csp.productId
|
|
WHERE cpsk.shopId = #{shopId}
|
|
WHERE cpsk.shopId = #{shopId}
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
|
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|