| | |
| | | select count(1) |
| | | from contract_order a |
| | | where member_id=#{memberId} |
| | | and contract_type=2 and order_type in (3,4) |
| | | and contract_type=2 |
| | | and closing_time is not null |
| | | <if test="type!=null and type==1"> |
| | | and reward_amount > 0 |
| | | </if> |
| | |
| | | </select> |
| | | |
| | | <select id="selectThirtyTotalCntByMemberId" resultType="java.math.BigDecimal"> |
| | | select count(id)/2 |
| | | select count(id) |
| | | from contract_order |
| | | where |
| | | member_id=#{memberId} |
| | | and contract_type=2 |
| | | and closing_time is not null |
| | | and create_time BETWEEN #{offsetDay} and #{date} |
| | | </select> |
| | | |
| | | <select id="selectThirtyWinCntByMemberId" resultType="java.math.BigDecimal"> |
| | | select count(id)/2 |
| | | select count(id) |
| | | from contract_order |
| | | where |
| | | member_id=#{memberId} |