From cc2cd727b55d94f1802b6bec0b839e9b7b116f92 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 31 Aug 2022 16:23:49 +0800
Subject: [PATCH] fix

---
 src/main/resources/mapper/dapp/DappPriceRecordDao.xml |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/dapp/DappPriceRecordDao.xml b/src/main/resources/mapper/dapp/DappPriceRecordDao.xml
index 68b303a..555f77a 100644
--- a/src/main/resources/mapper/dapp/DappPriceRecordDao.xml
+++ b/src/main/resources/mapper/dapp/DappPriceRecordDao.xml
@@ -2,4 +2,14 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="cc.mrbird.febs.dapp.mapper.DappPriceRecordDao">
 
+    <select id="selectPriceListInStartTimeAndEndTime" resultType="cc.mrbird.febs.dapp.entity.DappPriceRecordEntity">
+        select
+            date_format(create_time, '%Y-%m-%d %H:00:00') create_time,
+            avg(price) price
+        from dapp_price_record
+        where create_time >= #{startTime} or #{endTime} >= create_time
+        group by date_format(create_time, '%y-%m-%d %H')
+        order by id
+    </select>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1