mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 07:11:52 +08:00
发货配送模块表结构
This commit is contained in:
parent
14d02bdfb3
commit
0ffa7ff4c8
@ -305,12 +305,95 @@ CREATE TABLE `product_favorite` (
|
||||
`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='商品收藏表';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of product_spu
|
||||
-- Table structure for delivery_template
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `delivery_template`;
|
||||
CREATE TABLE `delivery_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 '创建者',
|
||||
`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 delivery_free_detail
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `delivery_free_detail`;
|
||||
CREATE TABLE `delivery_free_detail` (
|
||||
`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 '包邮件数,订单总件数>包邮件数才免运费',
|
||||
`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 delivery_charge_detail
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `delivery_charge_detail`;
|
||||
CREATE TABLE `delivery_charge_detail` (
|
||||
`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_price` int NOT NULL COMMENT '起步价(单位分)',
|
||||
`extra_quantity` 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 '创建时间',
|
||||
`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 pick_up_store
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `pick_up_store`;
|
||||
CREATE TABLE `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 '门店详细地址',
|
||||
`logo` varchar(256) NOT NULL COMMENT '门店logo',
|
||||
`opening_time` time NOT NULL COMMENT '营业开始时间',
|
||||
`closing_time` time NOT NULL COMMENT '营业结束时间',
|
||||
`latitude` varchar(128) NOT NULL COMMENT '纬度',
|
||||
`longitude` varchar(128) 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='自提门店';
|
||||
|
||||
BEGIN;
|
||||
COMMIT;
|
||||
|
||||
|
@ -0,0 +1,63 @@
|
||||
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.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 配送费用详情 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
|
||||
*/
|
||||
private Long templateId;
|
||||
|
||||
/**
|
||||
* 配送区域id 1:适用于全国
|
||||
*/
|
||||
private Integer areaId;
|
||||
|
||||
/**
|
||||
* 配送计费方式 1:按件 2:按重量 3:按体积
|
||||
*/
|
||||
private Integer chargeMode;
|
||||
|
||||
/**
|
||||
* 起步数量(件数,重量,或体积)
|
||||
*/
|
||||
private Double startQuantity;
|
||||
|
||||
/**
|
||||
* 起步价(单位分)
|
||||
*/
|
||||
private Integer startPrice;
|
||||
|
||||
/**
|
||||
* 续(件,重量,或体积)
|
||||
*/
|
||||
private Double extraQuantity;
|
||||
|
||||
/**
|
||||
* 额外价(单位分)
|
||||
*/
|
||||
private Integer extraPrice;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
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.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 配送包邮详情 DO
|
||||
*
|
||||
* @author jason
|
||||
*/
|
||||
@TableName(value ="delivery_free_detail")
|
||||
@KeySequence("delivery_free_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
public class DeliveryFreeDetailDO extends BaseDO {
|
||||
/**
|
||||
* 编号,自增
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 配送模板编号, 对应delivery_template表id
|
||||
*/
|
||||
private Long templateId;
|
||||
|
||||
/**
|
||||
* 包邮区域id
|
||||
*/
|
||||
private Integer areaId;
|
||||
|
||||
/**
|
||||
* 包邮金额(单位分) 订单总金额>包邮金额才免运费
|
||||
*/
|
||||
private Integer freePrice;
|
||||
|
||||
/**
|
||||
* 包邮件数,订单总件数>包邮件数才免运费
|
||||
*/
|
||||
private Integer freeNumber;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -2,6 +2,7 @@ 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.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
@ -27,4 +28,27 @@ public class DeliveryTemplateDO extends BaseDO {
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 配送费用类型 1:全区域包邮 2:非全区域包邮
|
||||
*/
|
||||
private Integer chargeType;
|
||||
|
||||
/**
|
||||
* 配送计费方式 1:按件 2:按重量 3:按体积
|
||||
*/
|
||||
private Integer chargeMode;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,85 @@
|
||||
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.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* 自提门店 DO
|
||||
*
|
||||
* @author jason
|
||||
*/
|
||||
@TableName(value ="pick_up_store")
|
||||
@KeySequence("pick_up_store_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
public class PickUpStoreDO extends BaseDO {
|
||||
/**
|
||||
* 编号,自增
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 门店名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 门店简介
|
||||
*/
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* 门店手机
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 区域id
|
||||
*/
|
||||
private Integer areaId;
|
||||
|
||||
/**
|
||||
* 门店详细地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 门店logo
|
||||
*/
|
||||
private String logo;
|
||||
|
||||
/**
|
||||
* 营业开始时间
|
||||
*/
|
||||
private LocalTime openingTime;
|
||||
|
||||
/**
|
||||
* 营业结束时间
|
||||
*/
|
||||
private LocalTime closingTime;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
private String latitude;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
private String longitude;
|
||||
|
||||
/**
|
||||
* 门店状态(0正常 1停用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 喜爱商品 DO
|
||||
* 商品收藏 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
|
@ -0,0 +1,14 @@
|
||||
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<DeliveryChargeDetailDO> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,14 @@
|
||||
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<DeliveryFreeDetailDO> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
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<DeliveryTemplateDO> {
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
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<PickUpStoreDO> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -5,13 +5,9 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.util.MyBatisUtils;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.favorite.ProductFavoriteDO;
|
||||
import cn.iocoder.yudao.module.product.controller.app.favorite.vo.AppFavoriteRespVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@Mapper
|
||||
public interface ProductFavoriteMapper extends BaseMapperX<ProductFavoriteDO> {
|
||||
|
@ -8,7 +8,7 @@ import cn.iocoder.yudao.module.product.controller.app.favorite.vo.AppFavoriteRes
|
||||
import javax.validation.Valid;
|
||||
|
||||
/**
|
||||
* 喜爱商品 Service 接口
|
||||
* 商品收藏 Service 接口
|
||||
*
|
||||
* @author jason
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user