From 3f213a4ae6de20328af2d79140637e0b8dab3e9b Mon Sep 17 00:00:00 2001 From: perry <292303709@qq.com> Date: Sun, 14 May 2023 13:33:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/ip/core/utils/AreaUtils.java | 17 ++++++++++++- .../yudao-module-product-biz/pom.xml | 4 ++-- .../yudao-module-shop-biz/pom.xml | 4 ++++ .../express/ShippingTemplatesController.java | 10 ++++---- .../ShippingTemplatesFreeController.java | 6 ++--- ...ShippingTemplatesNoDeliveryController.java | 6 ++--- .../ShippingTemplatesRegionController.java | 6 ++--- .../vo/ShippingTemplatesFreeRespVO.java | 2 +- .../vo/ShippingTemplatesNoDeliveryRespVO.java | 2 +- .../vo/ShippingTemplatesRegionRespVO.java | 2 +- .../express/vo/ShippingTemplatesReqVO.java | 13 ++++------ .../vo/ShippingTemplatesSearchReqVO.java | 2 +- .../express/ShippingTemplatesDO.java | 5 ++-- .../express/ShippingTemplatesFreeDO.java | 2 +- .../ShippingTemplatesNoDeliveryDO.java | 2 +- .../express/ShippingTemplatesRegionDO.java | 2 +- .../express/ShippingTemplatesFreeMapper.java | 6 ++--- .../express/ShippingTemplatesMapper.java | 4 ++-- .../ShippingTemplatesNoDeliveryMapper.java | 6 ++--- .../ShippingTemplatesRegionMapper.java | 6 ++--- .../express/ShippingTemplatesFreeService.java | 6 ++--- .../ShippingTemplatesNoDeliveryService.java | 6 ++--- .../ShippingTemplatesRegionService.java | 6 ++--- .../express/ShippingTemplatesService.java | 8 +++---- .../ShippingTemplatesFreeServiceImpl.java | 23 +++++++++--------- ...hippingTemplatesNoDeliveryServiceImpl.java | 22 +++++++++-------- .../ShippingTemplatesRegionServiceImpl.java | 24 ++++++++++--------- .../impl/ShippingTemplatesServiceImpl.java | 16 ++++++------- .../express/ShippingTemplatesFreeMapper.xml | 4 ++-- .../express/ShippingTemplatesMapper.xml | 2 +- .../ShippingTemplatesNoDeliveryMapper.xml | 4 ++-- .../express/ShippingTemplatesRegionMapper.xml | 4 ++-- 32 files changed, 127 insertions(+), 105 deletions(-) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/controller/admin/express/ShippingTemplatesController.java (91%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/controller/admin/express/ShippingTemplatesFreeController.java (88%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/controller/admin/express/ShippingTemplatesNoDeliveryController.java (88%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/controller/admin/express/ShippingTemplatesRegionController.java (88%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/controller/admin/express/vo/ShippingTemplatesFreeRespVO.java (96%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/controller/admin/express/vo/ShippingTemplatesNoDeliveryRespVO.java (95%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/controller/admin/express/vo/ShippingTemplatesRegionRespVO.java (97%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/controller/admin/express/vo/ShippingTemplatesReqVO.java (83%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/controller/admin/express/vo/ShippingTemplatesSearchReqVO.java (94%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/dal/dataobject/express/ShippingTemplatesDO.java (89%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/dal/dataobject/express/ShippingTemplatesFreeDO.java (96%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/dal/dataobject/express/ShippingTemplatesNoDeliveryDO.java (95%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/dal/dataobject/express/ShippingTemplatesRegionDO.java (96%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/dal/mysql/express/ShippingTemplatesFreeMapper.java (80%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/dal/mysql/express/ShippingTemplatesMapper.java (86%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/dal/mysql/express/ShippingTemplatesNoDeliveryMapper.java (79%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/dal/mysql/express/ShippingTemplatesRegionMapper.java (79%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/service/express/ShippingTemplatesFreeService.java (86%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/service/express/ShippingTemplatesNoDeliveryService.java (84%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/service/express/ShippingTemplatesRegionService.java (86%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/service/express/ShippingTemplatesService.java (82%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/service/express/impl/ShippingTemplatesFreeServiceImpl.java (87%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/service/express/impl/ShippingTemplatesNoDeliveryServiceImpl.java (80%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/service/express/impl/ShippingTemplatesRegionServiceImpl.java (89%) rename yudao-module-mall/{yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product => yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop}/service/express/impl/ShippingTemplatesServiceImpl.java (92%) rename yudao-module-mall/{yudao-module-product-biz => yudao-module-shop-biz}/src/main/resources/mapper/express/ShippingTemplatesFreeMapper.xml (69%) rename yudao-module-mall/{yudao-module-product-biz => yudao-module-shop-biz}/src/main/resources/mapper/express/ShippingTemplatesMapper.xml (62%) rename yudao-module-mall/{yudao-module-product-biz => yudao-module-shop-biz}/src/main/resources/mapper/express/ShippingTemplatesNoDeliveryMapper.xml (56%) rename yudao-module-mall/{yudao-module-product-biz => yudao-module-shop-biz}/src/main/resources/mapper/express/ShippingTemplatesRegionMapper.xml (70%) diff --git a/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtils.java b/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtils.java index d3fe59a6c..e661f12ee 100644 --- a/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtils.java +++ b/yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtils.java @@ -69,7 +69,15 @@ public class AreaUtils { public static Area getArea(Integer id) { return areas.get(id); } - + public static void getAreaId(List ids, AreaTypeEnum areaTypeEnum, List areaList) { + areaList.forEach(areas -> { + if(areaTypeEnum.getType().equals(areas.getType())){ + ids.add(areas.getId()); + }else{ + getAreaId(ids,areaTypeEnum,areas.getChildren()); + } + }); + } /** * 格式化区域 * @@ -116,4 +124,11 @@ public class AreaUtils { return sb.toString(); } + + public static void main(String[] args) { + List ids = new ArrayList(); + + getAreaId(ids,AreaTypeEnum.DISTRICT,AreaUtils.getArea(Area.ID_CHINA).getChildren()); + System.out.println(ids); + } } diff --git a/yudao-module-mall/yudao-module-product-biz/pom.xml b/yudao-module-mall/yudao-module-product-biz/pom.xml index 36643aefa..24a7ec7b8 100644 --- a/yudao-module-mall/yudao-module-product-biz/pom.xml +++ b/yudao-module-mall/yudao-module-product-biz/pom.xml @@ -74,8 +74,8 @@ pagehelper-spring-boot-starter - org.hibernate.validator - hibernate-validator + org.springframework.boot + spring-boot-starter-validation cn.iocoder.boot diff --git a/yudao-module-mall/yudao-module-shop-biz/pom.xml b/yudao-module-mall/yudao-module-shop-biz/pom.xml index 93831ac83..932b69f99 100644 --- a/yudao-module-mall/yudao-module-shop-biz/pom.xml +++ b/yudao-module-mall/yudao-module-shop-biz/pom.xml @@ -75,5 +75,9 @@ com.github.pagehelper pagehelper-spring-boot-starter + + cn.iocoder.boot + yudao-spring-boot-starter-biz-ip + \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesController.java similarity index 91% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesController.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesController.java index 788aff229..537fc1e65 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesController.java @@ -1,12 +1,12 @@ -package cn.iocoder.yudao.module.product.controller.admin.express; +package cn.iocoder.yudao.module.shop.controller.admin.express; import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesReqVO; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesSearchReqVO; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesDO; -import cn.iocoder.yudao.module.product.service.express.ShippingTemplatesService; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesReqVO; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesSearchReqVO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesDO; +import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesFreeController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesFreeController.java similarity index 88% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesFreeController.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesFreeController.java index 72edd9ddb..7cfc4406d 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesFreeController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesFreeController.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.module.product.controller.admin.express; +package cn.iocoder.yudao.module.shop.controller.admin.express; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesFreeRespVO; -import cn.iocoder.yudao.module.product.service.express.ShippingTemplatesFreeService; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesFreeRespVO; +import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesFreeService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.extern.slf4j.Slf4j; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesNoDeliveryController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesNoDeliveryController.java similarity index 88% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesNoDeliveryController.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesNoDeliveryController.java index 6c3fea29f..1f183c952 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesNoDeliveryController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesNoDeliveryController.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.module.product.controller.admin.express; +package cn.iocoder.yudao.module.shop.controller.admin.express; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesNoDeliveryRespVO; -import cn.iocoder.yudao.module.product.service.express.ShippingTemplatesNoDeliveryService; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesNoDeliveryRespVO; +import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesNoDeliveryService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.extern.slf4j.Slf4j; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesRegionController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesRegionController.java similarity index 88% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesRegionController.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesRegionController.java index 31befc767..38644efd9 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesRegionController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/ShippingTemplatesRegionController.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.module.product.controller.admin.express; +package cn.iocoder.yudao.module.shop.controller.admin.express; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesRegionRespVO; -import cn.iocoder.yudao.module.product.service.express.ShippingTemplatesRegionService; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesRegionRespVO; +import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesRegionService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.extern.slf4j.Slf4j; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesFreeRespVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesFreeRespVO.java similarity index 96% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesFreeRespVO.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesFreeRespVO.java index 3ef71cc89..3bb66a80d 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesFreeRespVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesFreeRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.product.controller.admin.express.vo; +package cn.iocoder.yudao.module.shop.controller.admin.express.vo; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesNoDeliveryRespVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesNoDeliveryRespVO.java similarity index 95% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesNoDeliveryRespVO.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesNoDeliveryRespVO.java index 347193cf1..07e9f152a 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesNoDeliveryRespVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesNoDeliveryRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.product.controller.admin.express.vo; +package cn.iocoder.yudao.module.shop.controller.admin.express.vo; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesRegionRespVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesRegionRespVO.java similarity index 97% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesRegionRespVO.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesRegionRespVO.java index f3e84ea54..b27b87223 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesRegionRespVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesRegionRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.product.controller.admin.express.vo; +package cn.iocoder.yudao.module.shop.controller.admin.express.vo; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.v3.oas.annotations.media.Schema; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesReqVO.java similarity index 83% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesReqVO.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesReqVO.java index 336e81329..0bfe99592 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesReqVO.java @@ -1,16 +1,12 @@ -package cn.iocoder.yudao.module.product.controller.admin.express.vo; +package cn.iocoder.yudao.module.shop.controller.admin.express.vo; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; -import org.hibernate.validator.constraints.Length; -import org.hibernate.validator.constraints.Range; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; +import javax.validation.constraints.*; import java.io.Serializable; import java.util.List; @@ -37,12 +33,13 @@ public class ShippingTemplatesReqVO implements Serializable { @Schema(description = "模板名称", required = true) @NotBlank(message = "模板名称必须填写") - @Length(max = 200, message = "模板名称不能超过200个字符") + @Size(max = 200, message = "模板名称不能超过200个字符") private String name; @Schema(description = "计费方式 1(按件数), 2(按重量),3(按体积)", example = "1", required = true) @NotNull(message = "计费方式必须选择") - @Range(min = 1, max = 3, message = "计费方式选择区间 1(按件数), 2(按重量),3(按体积)") + @Max(value = 3,message = "计费方式选择区间 1(按件数), 2(按重量),3(按体积)") + @Min(value = 1,message = "计费方式选择区间 1(按件数), 2(按重量),3(按体积)") private Integer type; @Schema(description = "配送区域及运费", required = true) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesSearchReqVO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesSearchReqVO.java similarity index 94% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesSearchReqVO.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesSearchReqVO.java index 861406fc9..f54579f34 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/vo/ShippingTemplatesSearchReqVO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/express/vo/ShippingTemplatesSearchReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.product.controller.admin.express.vo; +package cn.iocoder.yudao.module.shop.controller.admin.express.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesDO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesDO.java similarity index 89% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesDO.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesDO.java index 8f3bba26c..90184ac0c 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesDO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesDO.java @@ -1,5 +1,6 @@ -package cn.iocoder.yudao.module.product.dal.dataobject.express; +package cn.iocoder.yudao.module.shop.dal.dataobject.express; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; @@ -24,7 +25,7 @@ import lombok.experimental.Accessors; @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) @TableName("eb_shipping_templates") -public class ShippingTemplatesDO extends TenantBaseDO { +public class ShippingTemplatesDO extends BaseDO { private static final long serialVersionUID=1L; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesFreeDO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesFreeDO.java similarity index 96% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesFreeDO.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesFreeDO.java index f340db926..3b7023c87 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesFreeDO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesFreeDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.product.dal.dataobject.express; +package cn.iocoder.yudao.module.shop.dal.dataobject.express; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesNoDeliveryDO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesNoDeliveryDO.java similarity index 95% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesNoDeliveryDO.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesNoDeliveryDO.java index 913fe581f..c43abbdc1 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesNoDeliveryDO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesNoDeliveryDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.product.dal.dataobject.express; +package cn.iocoder.yudao.module.shop.dal.dataobject.express; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesRegionDO.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesRegionDO.java similarity index 96% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesRegionDO.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesRegionDO.java index b231cc684..7ea1a2c4b 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesRegionDO.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/express/ShippingTemplatesRegionDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.product.dal.dataobject.express; +package cn.iocoder.yudao.module.shop.dal.dataobject.express; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesFreeMapper.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesFreeMapper.java similarity index 80% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesFreeMapper.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesFreeMapper.java index e1ca02dd8..bbb40e3eb 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesFreeMapper.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesFreeMapper.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.module.product.dal.mysql.express; +package cn.iocoder.yudao.module.shop.dal.mysql.express; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesFreeRespVO; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesFreeDO; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesFreeRespVO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesFreeDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesMapper.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesMapper.java similarity index 86% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesMapper.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesMapper.java index 00439abd3..6b5d752f9 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesMapper.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesMapper.java @@ -1,7 +1,7 @@ -package cn.iocoder.yudao.module.product.dal.mysql.express; +package cn.iocoder.yudao.module.shop.dal.mysql.express; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesDO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesDO; import org.apache.ibatis.annotations.Mapper; /** diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesNoDeliveryMapper.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesNoDeliveryMapper.java similarity index 79% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesNoDeliveryMapper.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesNoDeliveryMapper.java index cfb7ceb67..1713de8cd 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesNoDeliveryMapper.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesNoDeliveryMapper.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.module.product.dal.mysql.express; +package cn.iocoder.yudao.module.shop.dal.mysql.express; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesNoDeliveryRespVO; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesNoDeliveryDO; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesNoDeliveryRespVO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesNoDeliveryDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesRegionMapper.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesRegionMapper.java similarity index 79% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesRegionMapper.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesRegionMapper.java index 4c59c6d33..3beeed1bd 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/express/ShippingTemplatesRegionMapper.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/mysql/express/ShippingTemplatesRegionMapper.java @@ -1,8 +1,8 @@ -package cn.iocoder.yudao.module.product.dal.mysql.express; +package cn.iocoder.yudao.module.shop.dal.mysql.express; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesRegionRespVO; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesRegionDO; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesRegionRespVO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesRegionDO; import org.apache.ibatis.annotations.Mapper; import java.util.List; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesFreeService.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesFreeService.java similarity index 86% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesFreeService.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesFreeService.java index 5a206efc2..dc99df313 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesFreeService.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesFreeService.java @@ -1,7 +1,7 @@ -package cn.iocoder.yudao.module.product.service.express; +package cn.iocoder.yudao.module.shop.service.express; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesFreeRespVO; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesFreeDO; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesFreeRespVO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesFreeDO; import com.baomidou.mybatisplus.extension.service.IService; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesNoDeliveryService.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesNoDeliveryService.java similarity index 84% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesNoDeliveryService.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesNoDeliveryService.java index ad1d5344d..065c63298 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesNoDeliveryService.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesNoDeliveryService.java @@ -1,7 +1,7 @@ -package cn.iocoder.yudao.module.product.service.express; +package cn.iocoder.yudao.module.shop.service.express; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesNoDeliveryRespVO; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesNoDeliveryDO; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesNoDeliveryRespVO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesNoDeliveryDO; import com.baomidou.mybatisplus.extension.service.IService; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesRegionService.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesRegionService.java similarity index 86% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesRegionService.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesRegionService.java index 643dbbf57..e681396ff 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesRegionService.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesRegionService.java @@ -1,7 +1,7 @@ -package cn.iocoder.yudao.module.product.service.express; +package cn.iocoder.yudao.module.shop.service.express; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesRegionRespVO; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesRegionDO; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesRegionRespVO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesRegionDO; import com.baomidou.mybatisplus.extension.service.IService; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesService.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesService.java similarity index 82% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesService.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesService.java index 3c5cd4e5a..26746bc52 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesService.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/ShippingTemplatesService.java @@ -1,9 +1,9 @@ -package cn.iocoder.yudao.module.product.service.express; +package cn.iocoder.yudao.module.shop.service.express; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesReqVO; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesSearchReqVO; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesDO; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesReqVO; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesSearchReqVO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesDO; import com.baomidou.mybatisplus.extension.service.IService; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesFreeServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesFreeServiceImpl.java similarity index 87% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesFreeServiceImpl.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesFreeServiceImpl.java index 8ab6a086c..83d64db5d 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesFreeServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesFreeServiceImpl.java @@ -1,16 +1,17 @@ -package cn.iocoder.yudao.module.product.service.express.impl; +package cn.iocoder.yudao.module.shop.service.express.impl; +import cn.hutool.core.lang.Assert; import cn.iocoder.yudao.framework.common.util.string.StrUtils; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesFreeRespVO; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesFreeDO; -import cn.iocoder.yudao.module.product.dal.mysql.express.ShippingTemplatesFreeMapper; -import cn.iocoder.yudao.module.product.service.express.ShippingTemplatesFreeService; -import cn.iocoder.yudao.module.system.controller.admin.ip.vo.AreaNodeRespVO; -import cn.iocoder.yudao.module.system.service.ip.AreaService; +import cn.iocoder.yudao.framework.ip.core.Area; +import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; +import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesFreeRespVO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesFreeDO; +import cn.iocoder.yudao.module.shop.dal.mysql.express.ShippingTemplatesFreeMapper; +import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesFreeService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.apache.commons.codec.digest.DigestUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; @@ -37,8 +38,6 @@ public class ShippingTemplatesFreeServiceImpl extends ServiceImpl cityIdList; @@ -94,7 +93,9 @@ public class ShippingTemplatesFreeServiceImpl extends ServiceImpl getCityIdList() { if(this.cityIdList == null || this.cityIdList.size() < 1){ - this.cityIdList = areaService.getAreaTree().stream().map(AreaNodeRespVO::getId).collect(Collectors.toList()); + Area area = AreaUtils.getArea(Area.ID_CHINA); + Assert.notNull(area, "获取不到中国"); + AreaUtils.getAreaId(cityIdList, AreaTypeEnum.DISTRICT,area.getChildren()); } return this.cityIdList; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesNoDeliveryServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesNoDeliveryServiceImpl.java similarity index 80% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesNoDeliveryServiceImpl.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesNoDeliveryServiceImpl.java index 32f976942..9e36be37d 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesNoDeliveryServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesNoDeliveryServiceImpl.java @@ -1,12 +1,14 @@ -package cn.iocoder.yudao.module.product.service.express.impl; +package cn.iocoder.yudao.module.shop.service.express.impl; +import cn.hutool.core.lang.Assert; import cn.iocoder.yudao.framework.common.util.string.StrUtils; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesNoDeliveryRespVO; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesNoDeliveryDO; -import cn.iocoder.yudao.module.product.dal.mysql.express.ShippingTemplatesNoDeliveryMapper; -import cn.iocoder.yudao.module.product.service.express.ShippingTemplatesNoDeliveryService; -import cn.iocoder.yudao.module.system.controller.admin.ip.vo.AreaNodeRespVO; -import cn.iocoder.yudao.module.system.service.ip.AreaService; +import cn.iocoder.yudao.framework.ip.core.Area; +import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; +import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesNoDeliveryRespVO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesNoDeliveryDO; +import cn.iocoder.yudao.module.shop.dal.mysql.express.ShippingTemplatesNoDeliveryMapper; +import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesNoDeliveryService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; @@ -25,8 +27,6 @@ public class ShippingTemplatesNoDeliveryServiceImpl extends ServiceImpl cityIdList; @@ -66,7 +66,9 @@ public class ShippingTemplatesNoDeliveryServiceImpl extends ServiceImpl getCityIdList() { if(this.cityIdList == null || this.cityIdList.size() < 1){ - this.cityIdList = areaService.getAreaTree().stream().map(AreaNodeRespVO::getId).collect(Collectors.toList()); + Area area = AreaUtils.getArea(Area.ID_CHINA); + Assert.notNull(area, "获取不到中国"); + AreaUtils.getAreaId(cityIdList, AreaTypeEnum.DISTRICT,area.getChildren()); } return this.cityIdList; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesRegionServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesRegionServiceImpl.java similarity index 89% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesRegionServiceImpl.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesRegionServiceImpl.java index 87e457c2a..558d11a62 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesRegionServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesRegionServiceImpl.java @@ -1,16 +1,17 @@ -package cn.iocoder.yudao.module.product.service.express.impl; +package cn.iocoder.yudao.module.shop.service.express.impl; +import cn.hutool.core.lang.Assert; import cn.iocoder.yudao.framework.common.util.string.StrUtils; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.ShippingTemplatesRegionRespVO; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesRegionDO; -import cn.iocoder.yudao.module.product.dal.mysql.express.ShippingTemplatesRegionMapper; -import cn.iocoder.yudao.module.product.service.express.ShippingTemplatesRegionService; -import cn.iocoder.yudao.module.system.controller.admin.ip.vo.AreaNodeRespVO; -import cn.iocoder.yudao.module.system.service.ip.AreaService; +import cn.iocoder.yudao.framework.ip.core.Area; +import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; +import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.ShippingTemplatesRegionRespVO; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesRegionDO; +import cn.iocoder.yudao.module.shop.dal.mysql.express.ShippingTemplatesRegionMapper; +import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesRegionService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.apache.commons.codec.digest.DigestUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; @@ -39,8 +40,7 @@ public class ShippingTemplatesRegionServiceImpl extends ServiceImpl cityIdList; @@ -106,7 +106,9 @@ public class ShippingTemplatesRegionServiceImpl extends ServiceImpl getCityIdList() { if(this.cityIdList == null || this.cityIdList.size() < 1){ - this.cityIdList = areaService.getAreaTree().stream().map(AreaNodeRespVO::getId).collect(Collectors.toList()); + Area area = AreaUtils.getArea(Area.ID_CHINA); + Assert.notNull(area, "获取不到中国"); + AreaUtils.getAreaId(cityIdList, AreaTypeEnum.DISTRICT,area.getChildren()); } return this.cityIdList; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesServiceImpl.java similarity index 92% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesServiceImpl.java rename to yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesServiceImpl.java index 6cdcd3311..a68ebab56 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/express/impl/ShippingTemplatesServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/express/impl/ShippingTemplatesServiceImpl.java @@ -1,16 +1,16 @@ -package cn.iocoder.yudao.module.product.service.express.impl; +package cn.iocoder.yudao.module.shop.service.express.impl; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.framework.common.exception.ServiceException; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.product.controller.admin.express.vo.*; -import cn.iocoder.yudao.module.product.dal.dataobject.express.ShippingTemplatesDO; -import cn.iocoder.yudao.module.product.dal.mysql.express.ShippingTemplatesMapper; -import cn.iocoder.yudao.module.product.service.express.ShippingTemplatesFreeService; -import cn.iocoder.yudao.module.product.service.express.ShippingTemplatesNoDeliveryService; -import cn.iocoder.yudao.module.product.service.express.ShippingTemplatesRegionService; -import cn.iocoder.yudao.module.product.service.express.ShippingTemplatesService; +import cn.iocoder.yudao.module.shop.controller.admin.express.vo.*; +import cn.iocoder.yudao.module.shop.dal.dataobject.express.ShippingTemplatesDO; +import cn.iocoder.yudao.module.shop.dal.mysql.express.ShippingTemplatesMapper; +import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesFreeService; +import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesNoDeliveryService; +import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesRegionService; +import cn.iocoder.yudao.module.shop.service.express.ShippingTemplatesService; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.apache.commons.lang3.StringUtils; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesFreeMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesFreeMapper.xml similarity index 69% rename from yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesFreeMapper.xml rename to yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesFreeMapper.xml index d8367e5e2..518028905 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesFreeMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesFreeMapper.xml @@ -1,8 +1,8 @@ - + - SELECT group_concat(`city_id`) AS city_id, title, `number`, price, uniqid FROM eb_shipping_templates_free where temp_id = #{tempId, jdbcType=INTEGER} GROUP BY `uniqid` ORDER BY id ASC diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesMapper.xml similarity index 62% rename from yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesMapper.xml rename to yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesMapper.xml index 743e3d994..2cbf25488 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesMapper.xml @@ -1,5 +1,5 @@ - + diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesNoDeliveryMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesNoDeliveryMapper.xml similarity index 56% rename from yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesNoDeliveryMapper.xml rename to yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesNoDeliveryMapper.xml index 364a3aaee..f403c4d62 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesNoDeliveryMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesNoDeliveryMapper.xml @@ -1,8 +1,8 @@ - + - SELECT group_concat(`city_id`) AS city_id, temp_id FROM eb_shipping_templates_no_delivery where temp_id = #{tempId, jdbcType=INTEGER} ORDER BY id ASC diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesRegionMapper.xml b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesRegionMapper.xml similarity index 70% rename from yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesRegionMapper.xml rename to yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesRegionMapper.xml index 1e7c7d4a7..3e174bafb 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/resources/mapper/express/ShippingTemplatesRegionMapper.xml +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/resources/mapper/express/ShippingTemplatesRegionMapper.xml @@ -1,8 +1,8 @@ - + - SELECT group_concat(`city_id`) AS city_id, title, `first`, first_price, `renewal`, renewal_price, uniqid FROM eb_shipping_templates_region where temp_id = #{tempId, jdbcType=INTEGER} GROUP BY `uniqid` ORDER BY id ASC