From 40e3b63bf3cd1b12842a19f395a9f4864c8d9d41 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo Date: Fri, 19 Apr 2024 10:27:39 +0800 Subject: [PATCH] =?UTF-8?q?fix(service):=20=E4=BF=AE=E6=94=B9=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC=E4=BD=93=E7=B3=BB=E7=BB=B4=E6=8A=A4=E6=97=B6=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=8D=E5=87=86=E7=A1=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BasicdataPriceRouteServiceImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceRouteServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceRouteServiceImpl.java index 469c224f7..4bacbfd67 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceRouteServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceRouteServiceImpl.java @@ -147,7 +147,7 @@ public class BasicdataPriceRouteServiceImpl extends BaseServiceImpl priceGeneralEntities = new ArrayList<>(); - biuldGeneral(route.getId(), generalServiceTypeEnums.getCode(), vo.getMinCost(), vo.getAdditionalCost(), priceGeneralEntities); + biuldGeneral(route, generalServiceTypeEnums.getCode(), vo.getMinCost(), vo.getAdditionalCost(), priceGeneralEntities); generalService.saveOrUpdateBatch(priceGeneralEntities); } return route.getId(); @@ -263,16 +263,16 @@ public class BasicdataPriceRouteServiceImpl extends BaseServiceImpl generalList) { + private void biuldGeneral(BasicdataPriceRouteEntity routeEntity, Integer code, Double minCost, Double additionalCost, List generalList) { // 1 最低计费一个价格体系一个服务类型只存在一条 BasicdataPriceGeneralEntity generalEntity = generalService.getOne(Wrappers.lambdaQuery() - .eq(BasicdataPriceGeneralEntity::getBoId, priceId) + .eq(BasicdataPriceGeneralEntity::getBoId, routeEntity.getId()) .eq(BasicdataPriceGeneralEntity::getServiceType, code) ); if (ObjectUtil.isEmpty(generalEntity)) { generalEntity = new BasicdataPriceGeneralEntity(); - generalEntity.setBoId(priceId); - generalEntity.setPriceId(priceId); + generalEntity.setBoId(routeEntity.getId()); + generalEntity.setPriceId(routeEntity.getPriceId()); generalEntity.setServiceType(code); } // 设置最低计费和加算价格