From be2e1f6efb67f481be39384dc2dc4a8f9e9d4bf5 Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Sat, 29 Oct 2022 23:16:47 +0800
Subject: [PATCH] fix

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

diff --git a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
index 54c7bf7..1064b1c 100644
--- a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
+++ b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
@@ -33,5 +33,52 @@
           and a.state = #{state}
     </select>
 
+    <select id="selectByMemberIdAndBelongNum" resultType="cc.mrbird.febs.dapp.entity.IgtOnHookPlanOrderItem">
+        SELECT
+            a.*
+        FROM igt_on_hook_plan_order_item a
+        where
+              a.member_id = #{memberId}
+          and a.belong_num = #{recordNum}
+            limit 1
+    </select>
+
+    <select id="selectTotalProfitByMemberIdAndStateAndIsgoal" resultType="java.math.BigDecimal">
+        SELECT
+            ifnull(sum(a.profit),0)
+        FROM igt_on_hook_plan_order_item a
+        where  a.member_id = #{memberId}
+          and a.is_goal = #{isGoal}
+          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