diff --git a/sql/mysql/optional/mall.sql b/sql/mysql/optional/mall.sql index ccd9751500..cc95883a85 100644 --- a/sql/mysql/optional/mall.sql +++ b/sql/mysql/optional/mall.sql @@ -307,15 +307,12 @@ CREATE TABLE `product_favorite` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB COMMENT='商品收藏表'; - +-- Table structure for trade_delivery_express_template -- ---------------------------- --- Table structure for delivery_template --- ---------------------------- -DROP TABLE IF EXISTS `delivery_template`; -CREATE TABLE `delivery_template` ( +DROP TABLE IF EXISTS `trade_delivery_express_template`; +CREATE TABLE `trade_delivery_express_template` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', `name` varchar(64) NOT NULL COMMENT '模板名称', - `charge_type` tinyint NOT NULL DEFAULT 1 COMMENT '配送费用类型 1:全区域包邮 2:非全区域包邮', `charge_mode` tinyint NOT NULL DEFAULT 1 COMMENT '配送计费方式 1:按件 2:按重量 3:按体积', `sort` int NOT NULL DEFAULT 0 COMMENT '排序', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', @@ -325,18 +322,18 @@ CREATE TABLE `delivery_template` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='配送模板'; +) ENGINE=InnoDB COMMENT='快递运费模板'; -- ---------------------------- --- Table structure for delivery_free_detail +-- Table structure for trade_delivery_express_template_free -- ---------------------------- -DROP TABLE IF EXISTS `delivery_free_detail`; -CREATE TABLE `delivery_free_detail` ( +DROP TABLE IF EXISTS `trade_delivery_express_template_free`; +CREATE TABLE `trade_delivery_express_template_free` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', `template_id` bigint NOT NULL COMMENT '配送模板编号, 对应delivery_template表id', `area_id` int NOT NULL COMMENT '包邮区域id', `free_price` int NOT NULL COMMENT '包邮金额(单位分) 订单总金额>包邮金额才免运费', - `free_number` int NOT NULL DEFAULT 0 COMMENT '包邮件数,订单总件数>包邮件数才免运费', + `free_count` int NOT NULL DEFAULT 0 COMMENT '包邮件数,订单总件数>包邮件数才免运费', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', @@ -344,20 +341,20 @@ CREATE TABLE `delivery_free_detail` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='配送包邮详情'; +) ENGINE=InnoDB COMMENT='快递运费模板包邮配置'; -- ---------------------------- --- Table structure for delivery_charge_detail +-- Table structure for trade_delivery_express_template_charge -- ---------------------------- -DROP TABLE IF EXISTS `delivery_charge_detail`; -CREATE TABLE `delivery_charge_detail` ( +DROP TABLE IF EXISTS `trade_delivery_express_template_charge`; +CREATE TABLE `trade_delivery_express_template_charge` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', `template_id` bigint NOT NULL COMMENT '配送模板编号, 对应delivery_template表id', `area_id` int NOT NULL COMMENT '配送区域id 1:适用于全国', `charge_mode` tinyint NOT NULL COMMENT '配送计费方式 1:按件 2:按重量 3:按体积', - `start_quantity` double NOT NULL COMMENT '起步数量(件数,重量,或体积)', + `start_count` double NOT NULL COMMENT '首件数量(件数,重量,或体积)', `start_price` int NOT NULL COMMENT '起步价(单位分)', - `extra_quantity` double NOT NULL COMMENT '续(件,重量,或体积)', + `extra_count` double NOT NULL COMMENT '续件数量(件,重量,或体积)', `extra_price` int NOT NULL COMMENT '额外价(单位分)', `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', @@ -366,19 +363,19 @@ CREATE TABLE `delivery_charge_detail` ( `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='配送费用详情'; +) ENGINE=InnoDB COMMENT='快递运费模板计费配置'; -- ---------------------------- --- Table structure for pick_up_store +-- Table structure for trade_delivery_pick_up_store -- ---------------------------- -DROP TABLE IF EXISTS `pick_up_store`; -CREATE TABLE `pick_up_store` ( +DROP TABLE IF EXISTS `trade_delivery_pick_up_store`; +CREATE TABLE `trade_delivery_pick_up_store` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', `name` varchar(64) NOT NULL COMMENT '门店名称', `introduction` varchar(256) COMMENT '门店简介', `phone` varchar(16) NOT NULL COMMENT '门店手机', `area_id` int NOT NULL COMMENT '区域id', - `address` varchar(256) NOT NULL COMMENT '门店详细地址', + `detail_address` varchar(256) NOT NULL COMMENT '门店详细地址', `logo` varchar(256) NOT NULL COMMENT '门店logo', `opening_time` time NOT NULL COMMENT '营业开始时间', `closing_time` time NOT NULL COMMENT '营业结束时间', @@ -394,8 +391,61 @@ CREATE TABLE `pick_up_store` ( PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB COMMENT='自提门店'; -BEGIN; -COMMIT; +-- ---------------------------- +-- Table structure for trade_delivery_pick_up_store_staff +-- ---------------------------- +DROP TABLE IF EXISTS `trade_delivery_pick_up_store_staff`; +CREATE TABLE `trade_delivery_pick_up_store_staff` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', + store_id bigint NOT NULL COMMENT '自提门店编号', + `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0正常 1停用)', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='自提门店店员'; + +-- ---------------------------- +-- Table structure for trade_delivery_pick_up_store_staff +-- ---------------------------- +DROP TABLE IF EXISTS `trade_delivery_pick_up_store_staff`; +CREATE TABLE `trade_delivery_pick_up_store_staff` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', + `admin_user_id` bigint NOT NULL COMMENT '管理员用户id', + store_id bigint NOT NULL COMMENT '自提门店编号', + `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0正常 1停用)', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='自提门店店员'; + + +-- ---------------------------- +-- Table structure for trade_delivery_express +-- ---------------------------- +DROP TABLE IF EXISTS `trade_delivery_express`; +CREATE TABLE `trade_delivery_express` ( + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', + `code` varchar(64) NOT NULL COMMENT '快递公司 code', + `name` varchar(64) NOT NULL COMMENT '快递公司名称', + `logo` varchar(256) COMMENT '快递公司logo', + `sort` int NOT NULL DEFAULT 0 COMMENT '排序', + `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态(0正常 1停用)', + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', + PRIMARY KEY (`id`) USING BTREE +) ENGINE=InnoDB COMMENT='配送快递公司'; SET FOREIGN_KEY_CHECKS = 1; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/DeliveryChargeDetailDO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/DeliveryChargeDetailDO.java deleted file mode 100644 index ccbf0bd510..0000000000 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/DeliveryChargeDetailDO.java +++ /dev/null @@ -1,68 +0,0 @@ -package cn.iocoder.yudao.module.product.dal.dataobject.delivery; - -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import com.baomidou.mybatisplus.annotation.KeySequence; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -// TODO @Jason:要不就叫 DeliveryExpressTemplateChargeDO;detail 主要用来作为明细,不适合作为条目 -/** - * 配送费用详情 DO - * - * @author jason - */ -@TableName(value ="delivery_charge_detail") -@KeySequence("delivery_charge_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 -@Data -public class DeliveryChargeDetailDO extends BaseDO { - - /** - * 编号,自增 - */ - @TableId - private Long id; - - /** - * 配送模板编号, 对应delivery_template表id - * - * // TODO @Jason:如果关联,写法如下 - * - * 关联 {@link DeliveryTemplateDO#getId()} - */ - private Long templateId; - - // TODO @Jason:全国最好使用 0 - /** - * 配送区域id 1:适用于全国 - */ - private Integer areaId; - - /** - * 配送计费方式 1:按件 2:按重量 3:按体积 - * - * 冗余 {@link DeliveryTemplateDO#getChargeMode()} - */ - private Integer chargeMode; - - // TODO @Jason:startCount;一般 count 作为数量哈 - /** - * 首件数量(件数,重量,或体积) - */ - private Double startQuantity; - /** - * 起步价,单位:分 - */ - private Integer startPrice; - - // TODO @Jason:startCount;一般 count 作为数量哈 - /** - * 续件数量(件,重量,或体积) - */ - private Double extraQuantity; - /** - * 额外价,单位:分 - */ - private Integer extraPrice; - -} diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/spu/ProductSpuDO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/spu/ProductSpuDO.java index e2ed9f2a1f..0a14919d34 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/spu/ProductSpuDO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/spu/ProductSpuDO.java @@ -1,10 +1,8 @@ package cn.iocoder.yudao.module.product.dal.dataobject.spu; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; import cn.iocoder.yudao.module.product.dal.dataobject.brand.ProductBrandDO; import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO; -import cn.iocoder.yudao.module.product.dal.dataobject.delivery.DeliveryTemplateDO; import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum; import com.baomidou.mybatisplus.annotation.KeySequence; @@ -143,7 +141,7 @@ public class ProductSpuDO extends TenantBaseDO { /** * 物流配置模板编号 * - * 关联 {@link DeliveryTemplateDO#getId()} + * 关联 { TradeDeliveryExpressTemplateDO#getId()} */ private Long deliveryTemplateId; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/DeliveryChargeDetailMapper.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/DeliveryChargeDetailMapper.java deleted file mode 100644 index 55658efc11..0000000000 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/DeliveryChargeDetailMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package cn.iocoder.yudao.module.product.dal.mysql.delivery; - -import cn.iocoder.yudao.module.product.dal.dataobject.delivery.DeliveryChargeDetailDO; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface DeliveryChargeDetailMapper extends BaseMapperX { - -} - - - - diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/DeliveryFreeDetailMapper.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/DeliveryFreeDetailMapper.java deleted file mode 100644 index abb0e080a9..0000000000 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/DeliveryFreeDetailMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package cn.iocoder.yudao.module.product.dal.mysql.delivery; - -import cn.iocoder.yudao.module.product.dal.dataobject.delivery.DeliveryFreeDetailDO; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface DeliveryFreeDetailMapper extends BaseMapperX { - -} - - - - diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/DeliveryTemplateMapper.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/DeliveryTemplateMapper.java deleted file mode 100644 index d6f7fed6b4..0000000000 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/DeliveryTemplateMapper.java +++ /dev/null @@ -1,10 +0,0 @@ -package cn.iocoder.yudao.module.product.dal.mysql.delivery; - - -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.module.product.dal.dataobject.delivery.DeliveryTemplateDO; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface DeliveryTemplateMapper extends BaseMapperX { -} diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/PickUpStoreMapper.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/PickUpStoreMapper.java deleted file mode 100644 index d2e81df954..0000000000 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/delivery/PickUpStoreMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package cn.iocoder.yudao.module.product.dal.mysql.delivery; - -import cn.iocoder.yudao.module.product.dal.dataobject.delivery.PickUpStoreDO; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import org.apache.ibatis.annotations.Mapper; - -@Mapper -public interface PickUpStoreMapper extends BaseMapperX { - -} - - - - diff --git a/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryExpressChargeModeEnum.java b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryExpressChargeModeEnum.java new file mode 100644 index 0000000000..2a2a45ee4e --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/delivery/DeliveryExpressChargeModeEnum.java @@ -0,0 +1,35 @@ +package cn.iocoder.yudao.module.trade.enums.delivery; + +import cn.iocoder.yudao.framework.common.core.IntArrayValuable; +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.Arrays; + +/** + * 快递配送计费方式枚举 + * + * @author jason + */ +@AllArgsConstructor +@Getter +public enum DeliveryExpressChargeModeEnum implements IntArrayValuable { + BY_PIECE(1, "按件"), + BY_WEIGHT(2,"按重量"), + BY_VOLUME(3, "按体积"); + + public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(DeliveryExpressChargeModeEnum::getType).toArray(); + /** + * 类型 + */ + private final Integer type; + /** + * 描述 + */ + private final String desc; + + @Override + public int[] array() { + return ARRAYS; + } +} diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressDO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressDO.java new file mode 100644 index 0000000000..4adab07ffc --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressDO.java @@ -0,0 +1,52 @@ +package cn.iocoder.yudao.module.trade.dal.dataobject.delivery; + +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +/** + * 配送快递公司 DO + * + * @author jason + */ +@TableName(value ="trade_delivery_express") +@KeySequence("trade_delivery_express_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +public class DeliveryExpressDO extends BaseDO { + /** + * 编号,自增 + */ + @TableId + private Long id; + + /** + * 快递公司 code + */ + private String code; + + /** + * 快递公司名称 + */ + private String name; + + /** + * 快递公司logo + */ + private String logo; + + /** + * 排序 + */ + private Integer sort; + + /** + * 状态 + * + * 枚举 {@link CommonStatusEnum} + */ + private Integer status; + +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressTemplateChargeDO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressTemplateChargeDO.java new file mode 100644 index 0000000000..17912f15b1 --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressTemplateChargeDO.java @@ -0,0 +1,63 @@ +package cn.iocoder.yudao.module.trade.dal.dataobject.delivery; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +/** + * 快递运费模板计费配置 DO + * + * @author jason + */ +@TableName(value ="trade_delivery_express_template_charge") +@KeySequence("trade_delivery_express_template_charge_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +public class DeliveryExpressTemplateChargeDO extends BaseDO { + + /** + * 编号,自增 + */ + @TableId + private Long id; + + /** + * 配送模板编号 + * + * 关联 {@link DeliveryExpressTemplateDO#getId()} + */ + private Long templateId; + + // TODO @Jason:全国最好使用 0 @芋艿 Area.ID_CHINA 是 1 + /** + * 配送区域id 1:适用于全国 + */ + private Integer areaId; + + /** + * 配送计费方式 + * + * 冗余 {@link DeliveryExpressTemplateDO#getChargeMode()} + */ + private Integer chargeMode; + + /** + * 首件数量(件数,重量,或体积) + */ + private Double startCount; + /** + * 起步价,单位:分 + */ + private Integer startPrice; + + /** + * 续件数量(件, 重量,或体积) + */ + private Double extraCount; + /** + * 额外价,单位:分 + */ + private Integer extraPrice; + +} diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/DeliveryTemplateDO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressTemplateDO.java similarity index 53% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/DeliveryTemplateDO.java rename to yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressTemplateDO.java index 815d85617b..b542f77023 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/DeliveryTemplateDO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressTemplateDO.java @@ -1,6 +1,7 @@ -package cn.iocoder.yudao.module.product.dal.dataobject.delivery; +package cn.iocoder.yudao.module.trade.dal.dataobject.delivery; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.module.trade.enums.delivery.DeliveryExpressChargeModeEnum; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -13,19 +14,14 @@ import lombok.*; // TODO @Jason:额外补充,不是这个类哈。应该还有个快递;DeliveryExpress;需要设计下这个表 /** - * 配送模板 SPU DO + * 快递运费模板 DO * - * @author 芋道源码 + * @author jason */ -@TableName("delivery_template") -@KeySequence("delivery_template_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@TableName("trade_delivery_express_template") +@KeySequence("trade_delivery_express_template_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class DeliveryTemplateDO extends BaseDO { +public class DeliveryExpressTemplateDO extends BaseDO { /** * 编号,自增 @@ -38,15 +34,10 @@ public class DeliveryTemplateDO extends BaseDO { */ private String name; - // TODO @Jason 我看了下,crmeb 界面是假的,没有全国包邮、部分包邮、自定义;直接干掉这个字段号了;没啥用。 /** - * 配送费用类型 1:全区域包邮 2:非全区域包邮 - */ - private Integer chargeType; - - // TODO @Jason:1:按件 2:按重量 3:按体积 枚举,然后关联下 - /** - * 配送计费方式 1:按件 2:按重量 3:按体积 + * 配送计费方式 + * + * 枚举 {@link DeliveryExpressChargeModeEnum} */ private Integer chargeMode; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/DeliveryFreeDetailDO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressTemplateFreeDO.java similarity index 55% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/DeliveryFreeDetailDO.java rename to yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressTemplateFreeDO.java index de6fc9a1e6..ffc59a6153 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/DeliveryFreeDetailDO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryExpressTemplateFreeDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.product.dal.dataobject.delivery; +package cn.iocoder.yudao.module.trade.dal.dataobject.delivery; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.KeySequence; @@ -6,16 +6,15 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -// TODO @Jason:要不就叫 DeliveryExpressTemplateFreeDO;detail 主要用来作为明细,不适合作为条目 /** - * 配送包邮详情 DO + * 快递运费模板包邮配置 DO * * @author jason */ -@TableName(value ="delivery_free_detail") -@KeySequence("delivery_free_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@TableName(value ="trade_delivery_express_template_free") +@KeySequence("trade_delivery_express_template_free_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data -public class DeliveryFreeDetailDO extends BaseDO { +public class DeliveryExpressTemplateFreeDO extends BaseDO { /** * 编号,自增 @@ -26,7 +25,7 @@ public class DeliveryFreeDetailDO extends BaseDO { /** * 配送模板编号 * - * 关联 {@link DeliveryTemplateDO#getId()} + * 关联 {@link DeliveryExpressTemplateDO#getId()} */ private Long templateId; @@ -42,12 +41,11 @@ public class DeliveryFreeDetailDO extends BaseDO { */ private Integer freePrice; - // TODO @Jason:freeCount;一般 count 作为数量哈 /** * 包邮件数 * * 订单总件数 > 包邮件数时,才免运费 */ - private Integer freeNumber; + private Integer freeCount; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/PickUpStoreDO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryPickUpStoreDO.java similarity index 73% rename from yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/PickUpStoreDO.java rename to yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryPickUpStoreDO.java index ce381123db..12c698665b 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/delivery/PickUpStoreDO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryPickUpStoreDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.product.dal.dataobject.delivery; +package cn.iocoder.yudao.module.trade.dal.dataobject.delivery; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; @@ -9,16 +9,15 @@ import lombok.Data; import java.time.LocalTime; -// TODO @Jason:DeliveryPickUpStoreDO /** * 自提门店 DO * * @author jason */ -@TableName(value ="pick_up_store") -@KeySequence("pick_up_store_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@TableName(value ="trade_delivery_pick_up_store") +@KeySequence("trade_delivery_pick_up_store_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 @Data -public class PickUpStoreDO extends BaseDO { +public class DeliveryPickUpStoreDO extends BaseDO { /** * 编号,自增 @@ -46,11 +45,10 @@ public class PickUpStoreDO extends BaseDO { */ private Integer areaId; - // TODO Jason:改成 detailAddress,主要和 AddressDO 保持一致哈 /** * 门店详细地址 */ - private String address; + private String detailAddress; /** * 门店 logo diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryPickUpStoreStaffDO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryPickUpStoreStaffDO.java new file mode 100644 index 0000000000..3bec270de3 --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/delivery/DeliveryPickUpStoreStaffDO.java @@ -0,0 +1,43 @@ +package cn.iocoder.yudao.module.trade.dal.dataobject.delivery; + +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +/** + * 自提门店店员 DO + * + * @author jason + */ +@TableName(value ="trade_delivery_pick_up_store_staff") +@KeySequence("trade_delivery_pick_up_store_staff_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +public class DeliveryPickUpStoreStaffDO extends BaseDO { + /** + * 编号,自增 + */ + @TableId + private Long id; + + /** + * 自提门店编号 + */ + private Long storeId; + + /** + * 管理员用户id + * + * 关联 {AdminUserDO#getId()} + */ + private Long adminUserId; + + /** + * 状态 + * + * 枚举 {@link CommonStatusEnum} + */ + private Integer status; +} \ No newline at end of file diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressMapper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressMapper.java new file mode 100644 index 0000000000..d2346f21fd --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressMapper.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.trade.dal.mysql.delivery; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressDO; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface DeliveryExpressMapper extends BaseMapperX { + +} + + + + diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressTemplateChargeMapper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressTemplateChargeMapper.java new file mode 100644 index 0000000000..c8f36d542f --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressTemplateChargeMapper.java @@ -0,0 +1,15 @@ +package cn.iocoder.yudao.module.trade.dal.mysql.delivery; + + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressTemplateChargeDO; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface DeliveryExpressTemplateChargeMapper extends BaseMapperX { + +} + + + + diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressTemplateFreeMapper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressTemplateFreeMapper.java new file mode 100644 index 0000000000..2e8c473796 --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressTemplateFreeMapper.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.trade.dal.mysql.delivery; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressTemplateFreeDO; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface DeliveryExpressTemplateFreeMapper extends BaseMapperX { + +} + + + + diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressTemplateMapper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressTemplateMapper.java new file mode 100644 index 0000000000..fa356b51e9 --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryExpressTemplateMapper.java @@ -0,0 +1,11 @@ +package cn.iocoder.yudao.module.trade.dal.mysql.delivery; + + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; + +import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryExpressTemplateDO; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface DeliveryExpressTemplateMapper extends BaseMapperX { +} diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryPickUpStoreMapper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryPickUpStoreMapper.java new file mode 100644 index 0000000000..d68924047c --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryPickUpStoreMapper.java @@ -0,0 +1,13 @@ +package cn.iocoder.yudao.module.trade.dal.mysql.delivery; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryPickUpStoreDO; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface DeliveryPickUpStoreMapper extends BaseMapperX { +} + + + + diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryPickUpStoreStaffMapper.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryPickUpStoreStaffMapper.java new file mode 100644 index 0000000000..06cc14e268 --- /dev/null +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/mysql/delivery/DeliveryPickUpStoreStaffMapper.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.trade.dal.mysql.delivery; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.module.trade.dal.dataobject.delivery.DeliveryPickUpStoreStaffDO; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface DeliveryPickUpStoreStaffMapper extends BaseMapperX { + +} + + + +