| | |
| | | <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> |
| | | |
| | |
| | | FROM igt_on_hook_plan_order_item a |
| | | where a.order_id = #{orderId} |
| | | and a.is_goal = #{isGoal} |
| | | and a.create_time < #{endTime} |
| | | and a.id < #{id} |
| | | order by a.id desc |
| | | limit 1 |
| | | </select> |
| | |
| | | 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 < #{end} |
| | | <if test="start != null"> |
| | | and a.id > #{start} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |