From e92b00089d8d57899df380135d79864dade09837 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 09 Feb 2023 16:18:59 +0800
Subject: [PATCH] 修改波场JAR 手续费修改成15trx

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

diff --git a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
index e356b72..1076fef 100644
--- a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
+++ b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
@@ -46,9 +46,8 @@
     <select id="selectTotalProfitByMemberIdAndStateAndIsgoal" resultType="java.math.BigDecimal">
         SELECT
             ifnull(sum(a.profit),0)
-        FROM igt_on_hook_plan_order_item a
+        FROM igt_on_hook_plan_order a
         where  a.member_id = #{memberId}
-          and a.is_goal = #{isGoal}
           and a.state = #{state}
     </select>
 
@@ -72,7 +71,6 @@
                 and a.create_time > #{startTime}
             </if>
         </where>
-        order by create_time desc
     </select>
 
     <select id="selectByIsgoalAndOrderId" resultType="java.lang.Long">
@@ -90,10 +88,33 @@
         FROM igt_on_hook_plan_order_item a
         where a.order_id = #{orderId}
           and a.is_goal = #{isGoal}
-          and a.create_time &lt; #{endTime}
-        order by create_time desc
+          and a.id &lt; #{id}
+        order by a.id desc
         limit 1
     </select>
 
+    <select id="selectOneByIgtIdAndMemberId" 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 a.id desc
+            limit 1
+    </select>
+
+    <select id="selectTotalAmountByIDAndOrderId" 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.id &lt; #{end}
+            <if test="start != null">
+                and a.id > #{start}
+            </if>
+        </where>
+    </select>
+
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1