From c3a72e424535647c7e50380759552dd5957d25e0 Mon Sep 17 00:00:00 2001 From: tangqian Date: Thu, 25 May 2023 18:46:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=85=E5=80=BC=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/order/impl/StoreOrderServiceImpl.java | 6 +++--- .../service/recharge/PhoneRecordServiceImpl.java | 13 ++++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java index ecccfd747..42eca6e55 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java @@ -1262,11 +1262,11 @@ public class StoreOrderServiceImpl extends ServiceImpl recordDOS = phoneRecordMapper.selectList(Wrappers.lambdaQuery().eq(PhoneRecordDO::getRechargeOrderId, orderId)); log.info("-------------------------recordDOS{},{}",recordDOS,recordDOS.size()); if (!CollectionUtils.isEmpty(recordDOS)) { - recordDOS.forEach(e->{ - e.setDeleted(Boolean.TRUE); - int i = phoneRecordMapper.updateById(e); - log.info("-------------------------i{}---------------------",i); - }); + Set ids = recordDOS.stream().map(PhoneRecordDO::getId).collect(Collectors.toSet()); + log.info("-------------------------ids{}",ids); + phoneRecordMapper.deleteBatchIds(ids); } return null; }