update 首页数据看板

This commit is contained in:
Lemon
2026-05-09 14:34:14 +08:00
parent f3300fb13b
commit ecded2ef39
11 changed files with 171 additions and 9 deletions

View File

@@ -3680,4 +3680,27 @@
<select id="countTotalOrders" resultType="java.lang.Long">
select count(*) from order_basic_info where del_flag = '0'
</select>
<select id="getTimeDistribution" resultType="com.jsowell.pile.vo.web.TimeDistributionVO">
SELECT
HOUR(t1.create_time) AS hour,
COUNT(*) AS orderCount
FROM order_basic_info t1
WHERE t1.del_flag = '0'
AND t1.order_status = '6'
<if test="dto.startTime != null and dto.startTime != ''">
AND t1.create_time &gt;= #{dto.startTime}
</if>
<if test="dto.endTime != null and dto.endTime != ''">
AND t1.create_time &lt;= #{dto.endTime}
</if>
<if test="dto.stationIdList != null and dto.stationIdList.size() > 0">
AND t1.station_id IN
<foreach item="sid" collection="dto.stationIdList" open="(" separator="," close=")">
#{sid}
</foreach>
</if>
GROUP BY HOUR(t1.create_time)
ORDER BY hour ASC
</select>
</mapper>