From e7c3f6bbcc4dd37bc931f40fb6eef475272117eb Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Sat, 29 Oct 2022 19:14:10 +0800
Subject: [PATCH] 20221021

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

diff --git a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
index 2a57252..1064b1c 100644
--- a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
+++ b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
@@ -52,5 +52,33 @@
           and a.state = #{state}
     </select>
 
+    <select id="selectByIgtIdAndMemberId" resultType="cc.mrbird.febs.dapp.entity.IgtOnHookPlanOrderItem">
+        SELECT
+            a.*
+        FROM igt_on_hook_plan_order_item a
+        where a.order_id = #{orderId}
+          and a.member_id = #{memberId}
+        order by create_time desc
+    </select>
+
+    <select id="selectTotalAmountByCreateTimeAndOrderId" resultType="java.math.BigDecimal">
+        SELECT
+            ifnull(sum(a.amount),0)
+        FROM igt_on_hook_plan_order_item a
+        where a.order_id = #{orderId}
+          and a.create_time &gt; #{startTime}
+          and a.create_time &lt; #{endTime}
+        order by create_time desc
+    </select>
+
+    <select id="selectByIsgoalAndOrderId" resultType="java.lang.Long">
+        SELECT
+            a.id
+        FROM igt_on_hook_plan_order_item a
+        where a.order_id = #{orderId}
+          and a.is_goal = #{isGoal}
+        order by create_time desc
+    </select>
+
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1