From c84de2a02892d1a4d9af628b226ee0960011fd41 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Sat, 29 Oct 2022 21:55:14 +0800
Subject: [PATCH] 20221021
---
src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
index 1064b1c..e356b72 100644
--- a/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
+++ b/src/main/resources/mapper/dapp/IgtOnHookPlanOrderItemDao.xml
@@ -65,9 +65,13 @@
SELECT
ifnull(sum(a.amount),0)
FROM igt_on_hook_plan_order_item a
- where a.order_id = #{orderId}
- and a.create_time > #{startTime}
- and a.create_time < #{endTime}
+ <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>
@@ -80,5 +84,16 @@
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 desc
+ limit 1
+ </select>
+
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1