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/IgtOnHookPlanOrderDao.xml |   79 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 78 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderDao.xml b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderDao.xml
index 43648e1..9e73c9b 100644
--- a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderDao.xml
+++ b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderDao.xml
@@ -12,10 +12,18 @@
     <update id="updateAvaAmountById">
         update igt_on_hook_plan_order
         set
-            ava_amount = ava_amount - #{amount},
+            ava_amount = ava_amount - #{amount}
         where
             id = #{id}
           and ava_amount - #{amount} <![CDATA[ >= ]]> 0
+    </update>
+
+    <update id="addAvaAmountById">
+        update igt_on_hook_plan_order
+        set
+            ava_amount = ava_amount + #{amount}
+        where
+            id = #{id}
     </update>
 
     <select id="selectByMemberId" resultType="cc.mrbird.febs.dapp.entity.IgtOnHookPlanOrder">
@@ -43,4 +51,73 @@
         where a.member_id = #{memberId}
     </select>
 
+    <select id="selectByCreateTime" resultType="cc.mrbird.febs.dapp.entity.IgtOnHookPlanOrder">
+        SELECT
+            a.*
+        FROM igt_on_hook_plan_order a
+        where and date_format(a.create_time, '%Y-%m-%d') = #{createTime}
+    </select>
+
+    <select id="findMemberPlanListInPage" resultType="cc.mrbird.febs.dapp.vo.AdminIgtOnHookPlanOrderVo">
+        SELECT
+        s.*,
+        m.username username
+        FROM
+        igt_on_hook_plan_order s
+        left join dapp_member m on m.id = s.member_id
+        <where>
+            <if test="record != null" >
+                <if test="record.username!=null and record.username!=''">
+                    and m.username = #{record.username}
+                </if>
+                <if test="record.description!=null and record.description!=''">
+                    and (s.member_id in (select id from dapp_member where FIND_IN_SET(#{record.description}, referer_ids)))
+                </if>
+                <if test="record.state!=null and record.state!=''">
+                    and s.state= #{record.state}
+                </if>
+                <if test="record.profitState!=null and record.profitState!=''">
+                    and s.profit_state= #{record.profitState}
+                </if>
+            </if>
+        </where>
+        order by s.create_time desc
+    </select>
+
+    <select id="selectIdsByState" resultType="java.lang.Long">
+        SELECT
+            a.id
+        FROM igt_on_hook_plan_order a
+        where a.state = #{state}
+    </select>
+
+    <update id="updateByIds" parameterType="list">
+            update igt_on_hook_plan_order
+            set
+                state = 2
+            where 1=1
+        <foreach collection="list" item="id">
+              or id = #{id}
+        </foreach>
+    </update>
+
+    <select id="findFlowListInPage" resultType="cc.mrbird.febs.dapp.entity.DappAccountMoneyChangeEntity">
+        SELECT
+        a.*,
+               b.username username
+        FROM
+        dapp_account_money_change a
+        left join dapp_member b on a.member_id = b.id
+        where a.order_id = #{orderId}
+        order by a.create_time asc
+    </select>
+
+    <update id="updatePlanOrder">
+        update igt_on_hook_plan_order
+        set
+            state = 3
+        where
+            state = 1
+    </update>
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1