feat:商户统计没有流水只有退款的bug
This commit is contained in:
1 parent
18018f838d
commit
49eaeff2f6
1 file changed
+6
-7
+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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user