Commit 8bcc6ca4 authored by 廖旭伟's avatar 廖旭伟

bug修改

parent b13740b4
......@@ -6,14 +6,14 @@
<!-- 人均访问深度 -->
<select id="getDepthAvg" parameterType="com.mortals.xhx.module.page.model.pdu.PageCensusPdu" resultType="com.mortals.xhx.module.page.model.vo.AccessTrendCensusVo">
SELECT
FORMAT(AVG(t.depthValue),2) AS depthAvg,
FORMAT(sum(t.depthValue)/count(t.id),2) AS singleDepth
IFNULL(FORMAT(AVG(t.depthValue),2),0) AS depthAvg,
IFNULL(FORMAT(sum(t.depthValue)/count(t.id),2),0) AS singleDepth
FROM
mortals_xhx_page_access_depth t
mortals_xhx_page_access_depth t
WHERE
t.productId = #{productId}
AND t.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{dateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
AND t.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{dateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
t.productId = #{productId}
AND t.createTime <![CDATA[ >= ]]> STR_TO_DATE(left(concat(#{dateTimeStart},' 00:00:00'),19),'%Y-%m-%d %k:%i:%s')
AND t.createTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{dateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment