个人钱包消费列表优化

This commit is contained in:
Guoqs
2025-01-22 11:18:55 +08:00
parent 432608a238
commit 031f9cd98f
7 changed files with 51 additions and 5 deletions

View File

@@ -503,13 +503,39 @@
<if test="dto.endDate != null and dto.endDate != ''">
and t1.create_time <![CDATA[ < ]]> #{dto.endDate,jdbcType=VARCHAR}
</if>
<!-- where t1.member_id = #{dto.memberId,jdbcType=VARCHAR}-->
<!-- and t1.wallet_code = #{dto.walletCode,jdbcType=VARCHAR}-->
<!-- and t1.create_time <![CDATA[ >= ]]> #{dto.tradeDate,jdbcType=VARCHAR}-->
<!-- and t1.create_time <![CDATA[ < ]]> #{dto.endDate,jdbcType=VARCHAR}-->
order by t1.create_time desc
</select>
<select id="getMemberWalletDetailV2" resultType="com.jsowell.pile.vo.uniapp.customer.MemberWalletLogVO">
SELECT t1.member_id as memberId,
t1.type,
t1.sub_type as subType,
t1.amount,
t1.category,
t1.related_order_code as relatedOrderCode,
t2.pay_amount as payAmount,
t2.order_amount as orderAmount,
t2.refund_amount as refundAmount,
t1.create_time as transactionTime
from member_wallet_log t1
left join order_basic_info t2 on t1.related_order_code = t2.order_code
where t1.sub_type != '12'
<if test="dto.memberId != null and dto.memberId != ''">
and t1.member_id = #{dto.memberId,jdbcType=VARCHAR}
</if>
<if test="dto.walletCode != null and dto.walletCode != ''">
and t1.wallet_code = #{dto.walletCode,jdbcType=VARCHAR}
</if>
<if test="dto.tradeDate != null and dto.tradeDate != ''">
and t1.create_time <![CDATA[ >= ]]> #{dto.tradeDate,jdbcType=VARCHAR}
</if>
<if test="dto.endDate != null and dto.endDate != ''">
and t1.create_time <![CDATA[ < ]]> #{dto.endDate,jdbcType=VARCHAR}
</if>
GROUP BY t1.related_order_code, t1.sub_type, t1.create_time
order by t1.create_time desc
</select>
<select id="getMemberRefundAmount" resultType="com.jsowell.pile.vo.uniapp.customer.MemberBalanceVO">
select member_id as memberId,
principal_balance as principalAmount