From 228e345aeb9c426c2b3bbc2b786e71da6ee55aa5 Mon Sep 17 00:00:00 2001
From: wzy <wzy19931122ai@163.com>
Date: Sat, 29 Oct 2022 23:46:51 +0800
Subject: [PATCH] Merge branch 'IGT-dev' of http://120.27.238.55:7000/r/sys-dapp into IGT-dev
---
src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml | 62 +++++++++++++++++++++++++++++++
1 files changed, 62 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
index 54c7bf7..c5a9274 100644
--- a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
+++ b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
@@ -33,5 +33,67 @@
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 < #{endTime}
+ <if test="startTime != null">
+ and a.create_time >= #{startTime}
+ </if>
+ </where>
+ 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>
+
+ <select id="selectByCreateTimeAndIsgoaAndOrderId" resultType="cc.mrbird.febs.dapp.entity.IgtOnHookPlanOrderItem">
+ SELECT
+ a.*
+ FROM igt_on_hook_plan_order_item a
+ where a.order_id = #{orderId}
+ and a.is_goal = #{isGoal}
+ and a.create_time < #{endTime}
+ order by create_time asc
+ limit 1
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1