feat:商户统计没有流水只有退款的bug

This commit is contained in:
dzc committed 2025-07-10 11:40:19 +08:00
1 parent 18018f838d
commit 49eaeff2f6
1 file changed
+6 -7
@@ -169,14 +169,13 @@ public class HardOrderTotalServiceImpl implements HardOrderTotalService {
List<HardOrderCsVo> refundList = hardOrderMapper.listRefundCs(refundDto, refundDataScope);
// 有退款没有流水的情况
if (ObjectUtil.isAllNotEmpty(totalList, refundList)) {
List<Long> totalIds = totalList.stream().map(HardOrderCsVo::getMerchantId).toList();
for (HardOrderCsVo refund : refundList) {
for (HardOrderCsVo total : totalList) {
if (ObjectUtil.equals(refund.getMerchantId(), total.getMerchantId())) {
HardOrderCsVo entity = BeanUtils.toBean(refund, HardOrderCsVo.class);
entity.setTotalPayPrice(BigDecimal.ZERO);
entity.setTotalPayCount(BigDecimal.ZERO);
totalList.add(entity);
}
if (!totalIds.contains(refund.getMerchantId())) {
HardOrderCsVo entity = BeanUtils.toBean(refund, HardOrderCsVo.class);
entity.setTotalPayPrice(BigDecimal.ZERO);
entity.setTotalPayCount(BigDecimal.ZERO);
totalList.add(entity);
}
}
}