From 6fea763316bd2b8d722ac59e5eea53f2e34412d0 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 15 Sep 2022 18:35:14 +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