getMemberBalanceChangesV2接口加字段

This commit is contained in:
Guoqs
2025-01-20 15:26:08 +08:00
parent 06dca3a4e9
commit 7f347f2bae
2 changed files with 21 additions and 16 deletions

View File

@@ -458,11 +458,11 @@ public class MemberService {
// 累计赠送金额
vo.setAccumulatedRechargeGift(memberWalletVO.getAccumulatedRechargeGift());
// 累计消费金额
vo.setTotalConsumption(memberWalletVO.getAccumulatedConsumptionAmount());
// 累计充值金额
vo.setAccumulatedRechargeAmount(memberWalletVO.getTotalRechargeAmount());
// 总充值
vo.setTotalRechargeAmount(memberWalletVO.getTotalRechargeAmount());
// 累计消费金额
vo.setAccumulatedConsumptionAmount(memberWalletVO.getAccumulatedConsumptionAmount());
// 根据日期查询会员钱包变动明细 分页
// 获取分页信息
@@ -485,19 +485,19 @@ public class MemberService {
List<MemberWalletLogVO> list = memberBasicInfoService.getMemberWalletDetail(dto);
// 总支出
// BigDecimal totalConsumption = list.stream()
// .map(MemberWalletLogVO::getOrderAmount)
// .filter(Objects::nonNull)
// .reduce(BigDecimal.ZERO, BigDecimal::add);
// vo.setTotalConsumption(totalConsumption);
BigDecimal totalConsumption = list.stream()
.map(MemberWalletLogVO::getOrderAmount)
.filter(Objects::nonNull)
.reduce(BigDecimal.ZERO, BigDecimal::add);
vo.setTotalConsumption(totalConsumption);
// 总充值
// BigDecimal totalRechargeAmount = list.stream()
// .filter(x -> StringUtils.equals(x.getType(), "1"))
// .filter(x -> StringUtils.equals(x.getSubType(), "10") || StringUtils.equals(x.getSubType(), "11"))
// .map(MemberWalletLogVO::getAmount)
// .reduce(BigDecimal.ZERO, BigDecimal::add);
// vo.setTotalRechargeAmount(totalRechargeAmount);
BigDecimal totalRechargeAmount = list.stream()
.filter(x -> StringUtils.equals(x.getType(), "1"))
.filter(x -> StringUtils.equals(x.getSubType(), "10") || StringUtils.equals(x.getSubType(), "11"))
.map(MemberWalletLogVO::getAmount)
.reduce(BigDecimal.ZERO, BigDecimal::add);
vo.setTotalRechargeAmount(totalRechargeAmount);
// PageInfo<MemberWalletLogVO> pageInfo = new PageInfo<>(list);
// 获取 type 和 subType 的对应信息