diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/ShopStoreSameCityTransportService.java b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/ShopStoreSameCityTransportService.java index 4c5a399d..137cdd80 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/ShopStoreSameCityTransportService.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/ShopStoreSameCityTransportService.java @@ -22,13 +22,21 @@ public interface ShopStoreSameCityTransportService { */ CommonResult deleteShopStoreSameCityTransport(Long transportId); + /** + * 根据店铺 Id 获取同城配送扩展设置列表 + * + * @param storeId + * @return + */ + List selectShopStoreSameCityTransportList(Long storeId); + /** * 根据同城配送基础配置自增 Id 获取同城配送扩展设置列表 * * @param transportBaseId * @return */ - List selectShopStoreSameCityTransportList(Long transportBaseId); + List selectShopStoreSameCityTransportListByTransportBaseId(Long transportBaseId); /** * 保存同城配送扩展设置列表(存在就更新,不存在就新增) diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreSameCityTransportBaseServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreSameCityTransportBaseServiceImpl.java index d91d4b18..9d2ab37e 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreSameCityTransportBaseServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreSameCityTransportBaseServiceImpl.java @@ -282,60 +282,93 @@ public class ShopStoreSameCityTransportBaseServiceImpl extends BaseServiceImpl transportList = shopStoreSameCityTransportService.selectShopStoreSameCityTransportList(transportBase.getStore_id()); + // 获取配送扩展设置列表 + List transportList; + if (CheckUtil.isEmpty(transportBase.getTransport_base_id())) { + transportList = shopStoreSameCityTransportService.selectShopStoreSameCityTransportList(transportBase.getStore_id()); + } else { + transportList = shopStoreSameCityTransportService.selectShopStoreSameCityTransportListByTransportBaseId(transportBase.getTransport_base_id()); + } shopStoreSameCityTransportBaseDTO.setTransportList(transportList); + logger.debug("成功获取店铺 {} 的同城配送设置详情", storeId); return shopStoreSameCityTransportBaseDTO; } + /** * 根据店铺Id获取同城配送基础运费记录 * diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreSameCityTransportServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreSameCityTransportServiceImpl.java index 1854c561..fc431599 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreSameCityTransportServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreSameCityTransportServiceImpl.java @@ -62,6 +62,31 @@ public class ShopStoreSameCityTransportServiceImpl extends BaseServiceImpl selectShopStoreSameCityTransportListByTransportBaseId(Long transportBaseId) { + if (transportBaseId == null || transportBaseId <= 0) { + return Collections.emptyList(); + } + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("transport_base_id", transportBaseId); + queryWrapper.eq("status", CommonConstant.Enable); + queryWrapper.orderByAsc("transport_id"); + + List shopStoreSameCityTransportList = list(queryWrapper); + if (CollectionUtil.isEmpty(shopStoreSameCityTransportList)) { + shopStoreSameCityTransportList = Collections.emptyList(); + } + + return shopStoreSameCityTransportList; + } + /** * 根据同城配送基础配置自增 Id 获取同城配送扩展设置列表 * diff --git a/pom.xml b/pom.xml index 68a9333d..47bd110b 100644 --- a/pom.xml +++ b/pom.xml @@ -539,11 +539,6 @@ - - org.apache.maven.plugins - maven-dependency-plugin - - com.spotify docker-maven-plugin @@ -571,7 +566,9 @@ build - + + + ${docker.registry}/mall/${project.artifactId}:${project.version} @@ -592,7 +589,7 @@ true ${project.version} - + latest @@ -609,6 +606,7 @@ +