From 982bdcd9ad51cbdf3ee416de64b57d0f31d50a70 Mon Sep 17 00:00:00 2001 From: js199000131 <2728757160@qq.com> Date: Mon, 15 May 2023 10:05:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E6=B5=81=E3=80=81=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=92=8C=E6=94=AF=E4=BB=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/express/ShippingTemplatesApi.java | 52 +++++++++++ .../api/express/ShippingTemplatesFreeApi.java | 44 ++++++++++ .../ShippingTemplatesNoDeliveryApi.java | 39 +++++++++ .../express/ShippingTemplatesRegionApi.java | 46 ++++++++++ .../api/express/dto/ShippingTemplatesDO.java | 55 ++++++++++++ .../express/dto/ShippingTemplatesFreeDO.java | 75 ++++++++++++++++ .../dto/ShippingTemplatesNoDeliveryDO.java | 51 +++++++++++ .../dto/ShippingTemplatesRegionDO.java | 87 +++++++++++++++++++ .../vo/ShippingTemplatesFreeRespVO.java | 51 +++++++++++ .../vo/ShippingTemplatesNoDeliveryRespVO.java | 36 ++++++++ .../vo/ShippingTemplatesRegionRespVO.java | 60 +++++++++++++ .../express/vo/ShippingTemplatesReqVO.java | 66 ++++++++++++++ .../vo/ShippingTemplatesSearchReqVO.java | 33 +++++++ ...pingTemplatesNoDeliverServiceImplTest.java | 14 +++ .../impl/StoreOrderRefundServiceImpl.java | 6 +- 15 files changed, 712 insertions(+), 3 deletions(-) create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesApi.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesFreeApi.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesNoDeliveryApi.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesRegionApi.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesDO.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesFreeDO.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesNoDeliveryDO.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesRegionDO.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesFreeRespVO.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesNoDeliveryRespVO.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesRegionRespVO.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesReqVO.java create mode 100644 yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesSearchReqVO.java create mode 100644 yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesNoDeliverServiceImplTest.java diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesApi.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesApi.java new file mode 100644 index 000000000..18b427aa9 --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesApi.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.product.api.express; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.product.api.express.dto.ShippingTemplatesDO; +import cn.iocoder.yudao.module.product.api.express.vo.ShippingTemplatesReqVO; +import cn.iocoder.yudao.module.product.api.express.vo.ShippingTemplatesSearchReqVO; +import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +/** +* ShippingTemplatesService 接口 +* +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- +*/ + +@Service +@Validated +public interface ShippingTemplatesApi extends IService { + + PageResult getList(ShippingTemplatesSearchReqVO request); + + /** + * 新增运费模板 + * @param request 请求参数 + * @return 新增结果 + */ + Boolean create(ShippingTemplatesReqVO request); + + Boolean update(Integer id, ShippingTemplatesReqVO request); + + /** + * 删除模板 + * @param id 模板id + * @return Boolean + */ + Boolean remove(Integer id); + + /** + * 获取模板信息 + * @param id 模板id + * @return ShippingTemplates + */ + ShippingTemplatesDO getInfo(Integer id); +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesFreeApi.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesFreeApi.java new file mode 100644 index 000000000..03c37d411 --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesFreeApi.java @@ -0,0 +1,44 @@ +package cn.iocoder.yudao.module.product.api.express; + +import cn.iocoder.yudao.module.product.api.express.dto.ShippingTemplatesFreeDO; +import cn.iocoder.yudao.module.product.api.express.vo.ShippingTemplatesFreeRespVO; +import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +/** +* ShippingTemplatesFreeService 接口 +* +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- +*/ +@Service +@Validated +public interface ShippingTemplatesFreeApi extends IService { + + void saveAll(List shippingTemplatesFreeRespVOList, Integer type, Integer id); + + List getListGroup(Integer tempId); + + /** + * 删除 + * @param tempId 运费模板id + */ + Boolean delete(Integer tempId); + + /** + * 根据模板编号、城市ID查询 + * @param tempId 模板编号 + * @param cityId 城市ID + * @return 运费模板 + */ + ShippingTemplatesFreeDO getByTempIdAndCityId(Integer tempId, Integer cityId); +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesNoDeliveryApi.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesNoDeliveryApi.java new file mode 100644 index 000000000..5cda5d28a --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesNoDeliveryApi.java @@ -0,0 +1,39 @@ +package cn.iocoder.yudao.module.product.api.express; + +import cn.iocoder.yudao.module.product.api.express.dto.ShippingTemplatesNoDeliveryDO; +import cn.iocoder.yudao.module.product.api.express.vo.ShippingTemplatesNoDeliveryRespVO; +import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +/** +* ShippingTemplatesFreeService 接口 +* +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- +*/ + +@Service +@Validated +public interface ShippingTemplatesNoDeliveryApi extends IService { + + void saveAll(List shippingTemplatesFreeRespVOList, Integer id); + + List getListGroup(Integer tempId); + + /** + * 根据模板编号、城市ID查询 + * @param tempId 模板编号 + * @param cityId 城市ID + * @return 运费模板 + */ + ShippingTemplatesNoDeliveryDO getByTempIdAndCityId(Integer tempId, Integer cityId); +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesRegionApi.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesRegionApi.java new file mode 100644 index 000000000..bee068a32 --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/ShippingTemplatesRegionApi.java @@ -0,0 +1,46 @@ +package cn.iocoder.yudao.module.product.api.express; + +import cn.iocoder.yudao.module.product.api.express.dto.ShippingTemplatesRegionDO; +import cn.iocoder.yudao.module.product.api.express.vo.ShippingTemplatesRegionRespVO; +import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import java.util.List; + +/** +* ShippingTemplatesRegionService 接口 +* +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- +*/ + +@Service +@Validated +public interface ShippingTemplatesRegionApi extends IService { + + void saveAll(List shippingTemplatesRegionRespVOList, Integer type, Integer id); + + List getListGroup(Integer tempId); + + /** + * 删除 + * @param tempId 运费模板id + * @return Boolean + */ + Boolean delete(Integer tempId); + + /** + * 根据模板编号、城市ID查询 + * @param tempId 模板编号 + * @param cityId 城市ID + * @return 运费模板 + */ + ShippingTemplatesRegionDO getByTempIdAndCityId(Integer tempId, Integer cityId); +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesDO.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesDO.java new file mode 100644 index 000000000..7100106c5 --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesDO.java @@ -0,0 +1,55 @@ +package cn.iocoder.yudao.module.product.api.express.dto; + +import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * 运费模版对象 + * +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("eb_shipping_templates") +public class ShippingTemplatesDO extends TenantBaseDO { + + private static final long serialVersionUID=1L; + + @TableId(value = "id", type = IdType.ASSIGN_ID) + private Integer id; + + /** + *模板名称 + */ + private String name; + + /** + *计费方式 + */ + private Integer type; + + /** + *指定包邮 + */ + private Boolean appoint; + + /** + *排序 + */ + private Integer sort; + + +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesFreeDO.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesFreeDO.java new file mode 100644 index 000000000..131c846c4 --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesFreeDO.java @@ -0,0 +1,75 @@ +package cn.iocoder.yudao.module.product.api.express.dto; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 免费运费模版 + * +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("eb_shipping_templates_free") +public class ShippingTemplatesFreeDO implements Serializable { + + private static final long serialVersionUID=1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 模板ID + */ + private Integer tempId; + + /** + *城市ID + */ + private Integer cityId; + + /** + *描述 + */ + private String title; + + /** + *包邮件数 + */ + private BigDecimal number; + + /** + *包邮金额 + */ + private BigDecimal price; + + /** + *计费方式 + */ + private Integer type; + + /** + *分组唯一值 + */ + private String uniqid; + + /** + *是否无效 + */ + private Boolean status; +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesNoDeliveryDO.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesNoDeliveryDO.java new file mode 100644 index 000000000..d986daa6d --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesNoDeliveryDO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.product.api.express.dto; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; + +/** + * 免费运费模版 + * +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("eb_shipping_templates_no_delivery") +public class ShippingTemplatesNoDeliveryDO implements Serializable { + + private static final long serialVersionUID=1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 模板ID + */ + private Integer tempId; + + /** + *城市ID + */ + private Integer cityId; + + /** + *省份ID + */ + private Integer province_id; + + +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesRegionDO.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesRegionDO.java new file mode 100644 index 000000000..c891ef358 --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/dto/ShippingTemplatesRegionDO.java @@ -0,0 +1,87 @@ +package cn.iocoder.yudao.module.product.api.express.dto; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 运费模版区域 + * +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("eb_shipping_templates_region") +public class ShippingTemplatesRegionDO implements Serializable { + + private static final long serialVersionUID=1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + /** + * 模板ID + */ + private Integer tempId; + + /** + *城市ID + */ + private Integer cityId; + + /** + *描述 + */ + private String title; + + /** + *首件 + */ + private BigDecimal first; + + /** + *首件运费 + */ + private BigDecimal firstPrice; + + /** + *续件 + */ + private BigDecimal renewal; + + /** + *续件运费 + */ + private BigDecimal renewalPrice; + + /** + *计费方式 1按件数 2按重量 3按体积 + */ + private Integer type; + + /** + *分组唯一值 + */ + private String uniqid; + + /** + *是否无效 + */ + private Boolean status; + + +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesFreeRespVO.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesFreeRespVO.java new file mode 100644 index 000000000..87a7ad3f1 --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesFreeRespVO.java @@ -0,0 +1,51 @@ +package cn.iocoder.yudao.module.product.api.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 javax.validation.constraints.DecimalMin; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 免费模版 Request + * +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("eb_shipping_templates_free") +@Schema(description="免费") +public class ShippingTemplatesFreeRespVO implements Serializable { + + private static final long serialVersionUID=1L; + + @Schema(description = "城市ID, 多个逗号分割。 全国 all", required = true, example = "1,2,3,4") + @NotNull(message = "请选择城市") + private String cityId; + + @Schema(description = "城市名称描述") + private String title; + + @Schema(description = "包邮件数", required = true, example = "1") +// @Min(value = 1, message = "请填写包邮件数") + @DecimalMin(value = "0.1", message = "包邮不能低于0.1") + private BigDecimal number; + + @Schema(description = "包邮金额", required = true, example = "0.1") + @NotNull(message = "请填写包邮金额") + @DecimalMin(value = "0", message = "包邮金额不能低于0") + private BigDecimal price; +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesNoDeliveryRespVO.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesNoDeliveryRespVO.java new file mode 100644 index 000000000..9b9b44568 --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesNoDeliveryRespVO.java @@ -0,0 +1,36 @@ +package cn.iocoder.yudao.module.product.api.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 javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * 免费模版 Request + * +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("eb_shipping_templates_no_delivery") +@Schema(description="指定不送达地区") +public class ShippingTemplatesNoDeliveryRespVO implements Serializable { + + private static final long serialVersionUID=1L; + + @Schema(description = "城市ID, 多个逗号分割。 全国 all", required = true, example = "1,2,3,4") + @NotNull(message = "请选择城市") + private String cityId; +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesRegionRespVO.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesRegionRespVO.java new file mode 100644 index 000000000..dab484ece --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesRegionRespVO.java @@ -0,0 +1,60 @@ +package cn.iocoder.yudao.module.product.api.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 javax.validation.constraints.DecimalMin; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * 模板区域Reuqest + * +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("eb_shipping_templates_region") +@Schema(description="付费") +public class ShippingTemplatesRegionRespVO implements Serializable { + + private static final long serialVersionUID=1L; + + @Schema(description = "城市ID, 多个逗号分割。全国 all", required = true, example = "1,2,3,4") + @NotNull(message = "请选择城市") + private String cityId; + + @Schema(description = "城市名称描述") + private String title; + + @Schema(description = "首件", required = true, example = "0.1") + @DecimalMin(value = "0.1", message = "首件金额不能低于0.1") + private BigDecimal first; + + @Schema(description = "首件运费", required = true, example = "0.1") + @DecimalMin(value = "0.1", message = "首件运费金额不能低于0.1") + private BigDecimal firstPrice; + + @Schema(description = "续件", required = true, example = "0.1") + @DecimalMin(value = "0.1", message = "续件不能低于0.1") + private BigDecimal renewal; + + @Schema(description = "续件运费", required = true, example = "0.1") + @DecimalMin(value = "0.1", message = "续件运费金额不能低于0.1") + private BigDecimal renewalPrice; + + @Schema(description = "分组唯一值") + private String uniqid; +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesReqVO.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesReqVO.java new file mode 100644 index 000000000..c12fd3486 --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesReqVO.java @@ -0,0 +1,66 @@ +package cn.iocoder.yudao.module.product.api.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 java.io.Serializable; +import java.util.List; + +/** + * 模版Request + * +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("eb_shipping_templates") +@Schema(description="模板") +public class ShippingTemplatesReqVO implements Serializable { + + private static final long serialVersionUID=1L; + + @Schema(description = "模板名称", required = true) + @NotBlank(message = "模板名称必须填写") + @Length(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(按体积)") + private Integer type; + + @Schema(description = "配送区域及运费", required = true) + private List shippingTemplatesRegionRespVOList; + + @Schema(description = "指定包邮", example = "1", required = true) + @NotNull(message = "指定包邮必须选择") + private Boolean appoint; + + @Schema(description = "指定包邮设置", required = true) + private List shippingTemplatesFreeRespVOList; + + @Schema(description = "指定不包邮设置", required = true) + private List shippingTemplatesNoDeliveryRespVOS; + + @Schema(description = "排序", example = "0") + @NotNull(message = "排序数字必须填写") + @Min(value = 0, message = "排序最小为0") + private Integer sort; + +} diff --git a/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesSearchReqVO.java b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesSearchReqVO.java new file mode 100644 index 000000000..b6f42870b --- /dev/null +++ b/yudao-module-mall/yudao-module-product-api/src/main/java/cn/iocoder/yudao/module/product/api/express/vo/ShippingTemplatesSearchReqVO.java @@ -0,0 +1,33 @@ +package cn.iocoder.yudao.module.product.api.express.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * 模板搜索Request + * +---------------------------------------------------------------------- + * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] + * +---------------------------------------------------------------------- + * | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. + * +---------------------------------------------------------------------- + * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 + * +---------------------------------------------------------------------- + * | Author: CRMEB Team + * +---------------------------------------------------------------------- + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +@TableName("eb_shipping_templates") +@Schema(description="模板搜索") +public class ShippingTemplatesSearchReqVO extends PageParam { + + private static final long serialVersionUID=1L; + + @Schema(description = "模板名称") + private String keywords; +} diff --git a/yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesNoDeliverServiceImplTest.java b/yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesNoDeliverServiceImplTest.java new file mode 100644 index 000000000..152d9ab44 --- /dev/null +++ b/yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/express/ShippingTemplatesNoDeliverServiceImplTest.java @@ -0,0 +1,14 @@ +//package cn.iocoder.yudao.module.product.service.express; +// +//import cn.iocoder.yudao.module.product.dal.mysql.express.ShippingTemplatesNoDeliveryMapper; +//import cn.iocoder.yudao.module.product.service.express.impl.ShippingTemplatesNoDeliveryServiceImpl; +//import org.junit.jupiter.api.Test; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.context.annotation.Import; +// +//import javax.annotation.Resource; +// +//@Import(ShippingTemplatesNoDeliveryServiceImpl.class) +//public class ShippingTemplatesNoDeliverServiceImplTest { +// +//} diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderRefundServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderRefundServiceImpl.java index b82890ee1..992846071 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderRefundServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderRefundServiceImpl.java @@ -49,21 +49,21 @@ public class StoreOrderRefundServiceImpl extends ServiceImpl