From c3a72e424535647c7e50380759552dd5957d25e0 Mon Sep 17 00:00:00 2001 From: tangqian Date: Thu, 25 May 2023 18:46:56 +0800 Subject: [PATCH 1/2] =?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; } From 38b5bfde5d57e8d1d82998ebdca579d6e510e688 Mon Sep 17 00:00:00 2001 From: tangqian Date: Fri, 26 May 2023 09:24:36 +0800 Subject: [PATCH 2/2] =?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 --- .../module/shop/service/recharge/PhoneRecordServiceImpl.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java index ef6f52eff..b4432b44e 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/recharge/PhoneRecordServiceImpl.java @@ -87,12 +87,9 @@ public class PhoneRecordServiceImpl implements PhoneRecordService { @TenantIgnore @Transactional public Boolean deletePhoneGearByOrderId(Long orderId) { - log.info("-------------------------orderId{}",orderId); List recordDOS = phoneRecordMapper.selectList(Wrappers.lambdaQuery().eq(PhoneRecordDO::getRechargeOrderId, orderId)); - log.info("-------------------------recordDOS{},{}",recordDOS,recordDOS.size()); if (!CollectionUtils.isEmpty(recordDOS)) { Set ids = recordDOS.stream().map(PhoneRecordDO::getId).collect(Collectors.toSet()); - log.info("-------------------------ids{}",ids); phoneRecordMapper.deleteBatchIds(ids); } return null;