```[sql]
-- ----------------------------
-- Table structure for ns_express_company
-- ----------------------------
DROP TABLE IF EXISTS `ns_express_company`;
CREATE TABLE `ns_express_company` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '店铺id',
`company_id` int(11) NOT NULL DEFAULT 0 COMMENT '物流公司id',
`company_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流公司名称',
`logo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'logo',
`express_no` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '编码',
`content_json` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '打印内容',
`background_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '背景图',
`font_size` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '打印字体',
`width` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '宽度',
`height` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '高度',
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间',
`scale` decimal(10,2) NOT NULL DEFAULT 1.00 COMMENT '真实尺寸(mm)与显示尺寸(px)的比例',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 AVG_ROW_LENGTH = 963 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '店铺物流公司' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_express_company_template
-- ----------------------------
DROP TABLE IF EXISTS `ns_express_company_template`;
CREATE TABLE `ns_express_company_template` (
`company_id` int(11) NOT NULL AUTO_INCREMENT,
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id',
`company_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流公司名称',
`logo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流公司logo',
`url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流公司网址',
`sort` int(11) NOT NULL DEFAULT 0 COMMENT '排序',
`express_no` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '编码',
`express_no_kd100` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '编码(快递100)',
`express_no_cainiao` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '编码(菜鸟)',
`content_json` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '打印内容',
`background_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '背景图',
`font_size` int(11) NOT NULL DEFAULT 14 COMMENT '打印字体',
`width` int(11) NOT NULL DEFAULT 0 COMMENT '宽度',
`height` int(11) NOT NULL DEFAULT 0 COMMENT '高度',
`scale` decimal(10,2) NOT NULL DEFAULT 1.00 COMMENT '真实尺寸(mm)与显示尺寸(px)的比例',
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间',
`is_electronicsheet` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否支持电子面单(0不支持 1支持)',
`print_style` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '电子面单打印风格',
PRIMARY KEY (`company_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 101 AVG_ROW_LENGTH = 2340 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统物流公司表' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_express_delivery_package
-- ----------------------------
DROP TABLE IF EXISTS `ns_express_delivery_package`;
CREATE TABLE `ns_express_delivery_package` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id',
`order_id` int(11) NOT NULL DEFAULT 0 COMMENT '订单id',
`order_goods_id_array` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单项商品组合列表',
`goods_id_array` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品组合列表',
`package_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '包裹名称 (包裹- 1 包裹 - 2)',
`delivery_type` tinyint(4) NOT NULL DEFAULT 0 COMMENT '发货方式1 需要物流 0无需物流',
`express_company_id` int(11) NOT NULL DEFAULT 0 COMMENT '快递公司id',
`express_company_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流公司名称',
`delivery_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '运单编号',
`delivery_time` int(11) NOT NULL DEFAULT 0 COMMENT '发货时间',
`member_id` int(11) NOT NULL DEFAULT 0 COMMENT '会员id',
`member_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '会员名称',
`express_company_image` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '发货公司图片',
`type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '发货方式(manual 手动发货 electronicsheet 电子面单发货)',
`template_id` int(11) NOT NULL DEFAULT 0 COMMENT '电子面单模板id',
`template_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '电子面单模板名称',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 569 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品订单物流信息表(多次发货)' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_express_electronicsheet
-- ----------------------------
DROP TABLE IF EXISTS `ns_express_electronicsheet`;
CREATE TABLE `ns_express_electronicsheet` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id',
`template_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '模板名称',
`company_id` int(1) NOT NULL DEFAULT 0 COMMENT '物流公司id',
`company_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '物流公司名称',
`express_no` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '编码',
`customer_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'CustomerName',
`customer_pwd` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'CustomerPwd',
`send_site` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'SendSite',
`send_staff` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'SendStaff',
`month_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'MonthCode',
`postage_payment_method` tinyint(3) NOT NULL DEFAULT 0 COMMENT '邮费支付方式(1现付 2到付 3月结)',
`is_notice` tinyint(3) NOT NULL DEFAULT 0 COMMENT '快递员上门揽件(0否 1是)',
`status` tinyint(3) NOT NULL DEFAULT 0 COMMENT '状态(0正常 -1不使用)',
`is_default` tinyint(3) NOT NULL DEFAULT 0 COMMENT '是否默认(0否 1是)',
`create_time` int(11) NOT NULL DEFAULT 0,
`update_time` int(11) NOT NULL DEFAULT 0,
`print_style` int(11) NOT NULL COMMENT '模板风格',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 3276 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '电子面单' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_express_template
-- ----------------------------
DROP TABLE IF EXISTS `ns_express_template`;
CREATE TABLE `ns_express_template` (
`template_id` int(11) NOT NULL AUTO_INCREMENT,
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '商家店铺id',
`template_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '模板名称',
`fee_type` int(11) NOT NULL DEFAULT 0 COMMENT '运费计算方式1.重量2体积3按件',
`create_time` int(11) NOT NULL DEFAULT 0 COMMENT '创建时间',
`modify_time` int(11) NOT NULL DEFAULT 0 COMMENT '修改时间',
`is_default` int(11) NOT NULL DEFAULT 0 COMMENT '是否默认',
`surplus_area_ids` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '剩余地址id',
PRIMARY KEY (`template_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 AVG_ROW_LENGTH = 42325 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '运费模板' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_express_template_item
-- ----------------------------
DROP TABLE IF EXISTS `ns_express_template_item`;
CREATE TABLE `ns_express_template_item` (
`item_id` int(11) NOT NULL AUTO_INCREMENT,
`template_id` int(11) NOT NULL DEFAULT 0 COMMENT '模板id',
`area_ids` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '地址id序列',
`area_names` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '地址名称序列',
`snum` int(11) NOT NULL DEFAULT 0 COMMENT '起步计算标准',
`sprice` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '起步计算价格',
`xnum` int(11) NOT NULL DEFAULT 0 COMMENT '续步计算标准',
`xprice` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '续步计算价格',
`fee_type` int(11) NOT NULL DEFAULT 1 COMMENT '运费计算方式',
PRIMARY KEY (`item_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 187 AVG_ROW_LENGTH = 122249 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '运费模板细节' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_local
-- ----------------------------
DROP TABLE IF EXISTS `ns_local`;
CREATE TABLE `ns_local` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id',
`type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'default' COMMENT '配送方式 default 商家自配送 other 第三方配送',
`area_type` int(11) NOT NULL DEFAULT 1 COMMENT '配送区域',
`local_area_json` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '区域配送设置',
`time_is_open` int(11) NOT NULL DEFAULT 0 COMMENT '订单达是否开启 0 关闭 1 开启',
`time_type` int(11) NOT NULL DEFAULT 0 COMMENT '时间选取类型 0 全天 1 自定义',
`time_week` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '营业时间 周一 周二.......',
`start_time` int(11) NOT NULL DEFAULT 0 COMMENT '当日的起始时间',
`end_time` int(11) NOT NULL DEFAULT 0 COMMENT '当日的营业结束时间',
`update_time` int(11) NOT NULL DEFAULT 0,
`is_open_step` int(11) NOT NULL DEFAULT 0 COMMENT '是否启用阶梯价(适用于行政区域)',
`start_distance` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '多少距离以内,...',
`start_delivery_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '多少距离以内,多少钱',
`continued_distance` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '每增加多少距离',
`continued_delivery_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '每增加多少距离,运费增加',
`start_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '起送价',
`delivery_money` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT '配送费',
`area_array` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '地域集合',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 AVG_ROW_LENGTH = 5461 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '本地配送设置' ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ns_local_delivery_package
-- ----------------------------
DROP TABLE IF EXISTS `ns_local_delivery_package`;
CREATE TABLE `ns_local_delivery_package` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`site_id` int(11) NOT NULL DEFAULT 0 COMMENT '站点id',
`order_id` int(11) NOT NULL DEFAULT 0 COMMENT '订单id',
`order_goods_id_array` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '订单项商品组合列表',
`goods_id_array` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品组合列表',
`package_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '包裹名称 (包裹- 1 包裹 - 2)',
`delivery_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'default' COMMENT '发货方式 default 商家自配送 other 第三方配送',
`delivery_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '运单编号',
`delivery_time` int(11) NOT NULL DEFAULT 0 COMMENT '发货时间',
`member_id` int(11) NOT NULL DEFAULT 0 COMMENT '会员id',
`member_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '会员名称',
`deliverer` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '配送员',
`deliverer_mobile` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 AVG_ROW_LENGTH = 8192 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '外卖配送物流信息表' ROW_FORMAT = Compact;
```
- 序言
- 商城简介
- 代码规范
- model层命名规范
- 前端(管理页面)命名
- 控制器命名规范
- 入门指导
- 伪静态配置
- 数据库配置
- 系统环境
- 系统框架
- 目录结构
- 数据库操作
- 标准代码(前端)
- 提示面板
- 表单
- 插件开发
- 插件目录
- 插件开发说明
- 事件开发
- 常用事件
- 数据字典
- 系统基础表
- 微信小程序相关
- 微信公众号相关
- 配送相关表
- 商品相关表
- 店铺网站设置相关
- 门店相关表
- 会员相关表
- 订单相关表
- 营销(组合套餐)
- 营销(砍价)
- 营销(优惠券)
- 营销(限时折扣)
- 营销(满额包邮)
- 营销(互动游戏)
- 营销(团购)
- 营销(满减送)
- 营销(拼团)
- 营销(秒杀)
- 营销(专题)
- 应用(分销)
- 应用(店铺笔记)
- 应用(小票打印)
- 应用(积分兑换)