个人钱包消费列表优化

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

@@ -85,6 +85,14 @@ public interface MemberWalletLogMapper {
*/
List<MemberWalletLogVO> getMemberWalletDetail(@Param("dto") UniAppQueryMemberBalanceDTO dto);
/**
* 小程序查询会员余额明细
* 根据订单合并
* @param dto
* @return
*/
List<MemberWalletLogVO> getMemberWalletDetailV2(@Param("dto") UniAppQueryMemberBalanceDTO dto);
/**
* 批量查询用户可退款金额
*

View File

@@ -141,6 +141,7 @@ public interface MemberBasicInfoService {
*/
List<MemberWalletLogVO> getMemberWalletDetail(UniAppQueryMemberBalanceDTO dto);
List<MemberWalletLogVO> getMemberWalletDetailV2(UniAppQueryMemberBalanceDTO dto);
/**
* 批量查询用户可退款金额
@@ -159,4 +160,6 @@ public interface MemberBasicInfoService {
* @return
*/
List<MemberVO> getMemberInfoByPlateNumber(String plateNumber);
}

View File

@@ -595,6 +595,11 @@ public class MemberBasicInfoServiceImpl implements MemberBasicInfoService {
return memberWalletLogMapper.getMemberWalletDetail(dto);
}
@Override
public List<MemberWalletLogVO> getMemberWalletDetailV2(UniAppQueryMemberBalanceDTO dto) {
return memberWalletLogMapper.getMemberWalletDetailV2(dto);
}
/**
* 批量查询用户可退款金额
* @param memberIds

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