From e949122b37ecfc4438676570f809e9348730fe8f Mon Sep 17 00:00:00 2001 From: yuyongle <1150359267@qq.com> Date: Tue, 26 Aug 2025 09:47:32 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E8=BD=A6?= =?UTF-8?q?=E8=BE=86=E6=94=B6=E8=B4=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/service/impl/CostCarChargeServiceImpl.java | 3 ++- .../ruoyi-nacos/src/main/resources/application.properties | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostCarChargeServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostCarChargeServiceImpl.java index ca8efbed..993f144f 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostCarChargeServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CostCarChargeServiceImpl.java @@ -81,8 +81,9 @@ public class CostCarChargeServiceImpl implements ICostCarChargeService { Page result = baseMapper.selectVoPage(pageQuery.build(), lqw); // List residentPersonIdList = result.getRecords().stream().map(vo -> vo.getPersonId()).distinct().collect(Collectors.toList()); // List remoteUserVos = remoteUserService.selectListByIds(residentPersonIdList); + List residentPeoplelist = residentPersonMapper.selectList(); - List roomNames = roomService.queryRoomNameList(idList); +// List roomNames = roomService.queryRoomNameList(idList); result.getRecords().stream().forEach(s -> { if (CollUtil.isNotEmpty(residentPeoplelist)) { ResidentPerson residentPerson = residentPeoplelist.stream() diff --git a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties index ef3ece6a..40aba4ad 100644 --- a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties +++ b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties @@ -40,9 +40,9 @@ spring.sql.init.platform=mysql db.num=1 ### Connect URL of DB: -db.url.0=jdbc:mysql://10.20.1.65:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true +db.url.0=jdbc:mysql://192.168.159.129:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true db.user.0=root -db.password.0=By@2025! +db.password.0=123456 ### the maximum retry times for push nacos.config.push.maxRetryTime=50 From a6b0277ff62644e7fb1c3c14d8a334bded587e59 Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Tue, 26 Aug 2025 10:26:47 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix:=E7=BB=BF=E6=A4=8D=E7=A7=9F=E8=B5=81?= =?UTF-8?q?=E6=96=B9=E6=A1=88=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../property/mapper/PlantsPlanProductMapper.java | 1 + .../service/IPlantsPlanProductService.java | 6 ++++++ .../service/impl/PlantsPlanProductServiceImpl.java | 14 ++++++++++++++ .../service/impl/PlantsRentalPlanServiceImpl.java | 4 ++++ .../mapper/Property/PlantsPlanProductMapper.xml | 7 +++++++ 5 files changed, 32 insertions(+) diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/PlantsPlanProductMapper.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/PlantsPlanProductMapper.java index 44f2a5bb..c933d2c8 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/PlantsPlanProductMapper.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/mapper/PlantsPlanProductMapper.java @@ -17,6 +17,7 @@ import java.util.List; public interface PlantsPlanProductMapper extends BaseMapperPlus { void deleteByPlanId(Long planId); + void deleteByPlanIds(List planIds); List queryProductsInfo(Long planId); } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IPlantsPlanProductService.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IPlantsPlanProductService.java index d7a72d32..50015766 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IPlantsPlanProductService.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/IPlantsPlanProductService.java @@ -67,6 +67,12 @@ public interface IPlantsPlanProductService { */ Boolean deleteWithValidByIds(Collection ids, Boolean isValid); + /** + * 根据方案id删除方案产品 + * @param ids + */ + void deleteByPlanIds(List ids); + /** * 批量保存租赁方案植物 * diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsPlanProductServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsPlanProductServiceImpl.java index 0ea6d4bd..1d6f5474 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsPlanProductServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsPlanProductServiceImpl.java @@ -159,6 +159,7 @@ public class PlantsPlanProductServiceImpl implements IPlantsPlanProductService { /** * 查询租赁方案植物数据 + * * @param planId * @return */ @@ -166,4 +167,17 @@ public class PlantsPlanProductServiceImpl implements IPlantsPlanProductService { public List queryPlanProductsInfo(Long planId) { return baseMapper.queryProductsInfo(planId); } + + /** + * 根据方案id删除方案产品 + * + * @param ids 方案id + * @return + */ + @Override + public void deleteByPlanIds(List ids) { + if (CollectionUtils.isNotEmpty(ids)) { + baseMapper.deleteByPlanIds(ids); + } + } } diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsRentalPlanServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsRentalPlanServiceImpl.java index d63c6278..a4947964 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsRentalPlanServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/PlantsRentalPlanServiceImpl.java @@ -25,6 +25,7 @@ import org.dromara.property.domain.vo.PlantsRentalPlanVo; import org.dromara.property.domain.PlantsRentalPlan; import org.dromara.property.mapper.PlantsRentalPlanMapper; import org.dromara.property.service.IPlantsRentalPlanService; +import org.springframework.transaction.annotation.Transactional; import java.util.*; @@ -166,6 +167,7 @@ public class PlantsRentalPlanServiceImpl implements IPlantsRentalPlanService { * @return 是否删除成功 */ @Override + @Transactional(rollbackFor = Exception.class) public Boolean deleteWithValidByIds(Collection ids, Boolean isValid) { if(isValid){ PlantsRentalOrderBo plantsRentalOrderBo = new PlantsRentalOrderBo(); @@ -174,6 +176,8 @@ public class PlantsRentalPlanServiceImpl implements IPlantsRentalPlanService { if(CollectionUtils.isNotEmpty(plantsRentalOrderVos)){ throw new ServiceException("当前选中租赁方案不可删除"); } + //删除方案产品数据 + planProductService.deleteByPlanIds(ids.stream().toList()); } return baseMapper.deleteByIds(ids) > 0; } diff --git a/ruoyi-modules/Property/src/main/resources/mapper/Property/PlantsPlanProductMapper.xml b/ruoyi-modules/Property/src/main/resources/mapper/Property/PlantsPlanProductMapper.xml index f46532f8..d07caa86 100644 --- a/ruoyi-modules/Property/src/main/resources/mapper/Property/PlantsPlanProductMapper.xml +++ b/ruoyi-modules/Property/src/main/resources/mapper/Property/PlantsPlanProductMapper.xml @@ -26,6 +26,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" delete from plants_plan_product p where p.plan_id=#{planId} + + delete from plants_plan_product p where p.plan_id in + + #{planId} + + +