初始化项目

This commit is contained in:
2026-09-01 22:15:50 +08:00
commit b5a26a8848
11217 changed files with 1710987 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
APP_DEBUG = false␍␍[APP]␍DEFAULT_TIMEZONE = Asia/Shanghai␍␍[DATABASE]␍TYPE = mysql␍HOSTNAME = ~db_host~␍DATABASE = ~db_name~␍USERNAME = ~db_user~␍PASSWORD = ~db_pwd~␍HOSTPORT = ~db_port~␍CHARSET = ~db_charset~␍DEBUG = false␍␍[CACHE]␍DRIVER = file␍␍[REDIS]␍HOSTNAME = 127.0.0.1␍HOSTPORT = 6379␍PASSWORD =␍SELECT = 0␍␍[LANG]␍default_lang = zh-cn
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,960 @@
DROP TABLE IF EXISTS `yoshop_admin_user`;
CREATE TABLE `yoshop_admin_user` (
`admin_user_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_name` varchar(255) NOT NULL DEFAULT '' COMMENT '用户名',
`password` varchar(255) NOT NULL DEFAULT '' COMMENT '登录密码',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) NOT NULL COMMENT '更新时间',
PRIMARY KEY (`admin_user_id`),
KEY `user_name` (`user_name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='超管用户记录表';
DROP TABLE IF EXISTS `yoshop_article`;
CREATE TABLE `yoshop_article` (
`article_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '文章ID',
`title` varchar(300) NOT NULL DEFAULT '' COMMENT '文章标题',
`show_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '列表显示方式(10小图展示 20大图展示)',
`category_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '文章分类ID',
`image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '封面图ID',
`content` longtext NOT NULL COMMENT '文章内容',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '文章排序(数字越小越靠前)',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '文章状态(0隐藏 1显示)',
`virtual_views` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '虚拟阅读量(仅用作展示)',
`actual_views` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '实际阅读量',
`is_delete` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`article_id`),
KEY `category_id` (`category_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='文章记录表';
DROP TABLE IF EXISTS `yoshop_article_category`;
CREATE TABLE `yoshop_article_category` (
`category_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '文章分类ID',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '分类名称',
`status` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态(1显示 0隐藏)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序方式(数字越小越靠前)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`category_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='文章分类表';
DROP TABLE IF EXISTS `yoshop_cart`;
CREATE TABLE `yoshop_cart` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`goods_sku_id` varchar(255) NOT NULL COMMENT '商品sku唯一标识',
`goods_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品数量',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `goods_id` (`goods_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`),
KEY `goods_id_2` (`goods_id`,`goods_sku_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='购物车记录表';
DROP TABLE IF EXISTS `yoshop_category`;
CREATE TABLE `yoshop_category` (
`category_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品分类ID',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '分类名称',
`parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上级分类ID',
`image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '分类图片ID',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1显示 0隐藏)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序方式(数字越小越靠前)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`category_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品分类表';
DROP TABLE IF EXISTS `yoshop_comment`;
CREATE TABLE `yoshop_comment` (
`comment_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '评价ID',
`score` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '评分 (10好评 20中评 30差评)',
`content` text NOT NULL COMMENT '评价内容',
`is_picture` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否为图片评价',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态(0隐藏 1显示)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '评价排序',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`order_goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单商品ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`is_delete` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '软删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`comment_id`),
KEY `user_id` (`user_id`),
KEY `order_id` (`order_id`),
KEY `goods_id` (`goods_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品评价记录表';
DROP TABLE IF EXISTS `yoshop_comment_image`;
CREATE TABLE `yoshop_comment_image` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`comment_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '评价ID',
`image_id` int(11) NOT NULL DEFAULT '0' COMMENT '图片id(关联文件记录表)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `comment_id` (`comment_id`) USING BTREE,
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品评价图片记录表';
DROP TABLE IF EXISTS `yoshop_coupon`;
CREATE TABLE `yoshop_coupon` (
`coupon_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '优惠券ID',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '优惠券名称',
`coupon_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '优惠券类型(10满减券 20折扣券)',
`reduce_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '满减券-减免金额',
`discount` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '折扣券-折扣率(0-100)',
`min_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最低消费金额',
`expire_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '到期类型(10领取后生效 20固定时间)',
`expire_day` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '领取后生效-有效天数',
`start_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '固定时间-开始时间',
`end_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '固定时间-结束时间',
`apply_range` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '适用范围(10全部商品 20指定商品 30排除商品)',
`apply_range_config` text COMMENT '适用范围配置(json格式)',
`total_num` int(11) NOT NULL DEFAULT '0' COMMENT '发放总数量(-1为不限制)',
`receive_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '已领取数量',
`describe` varchar(500) NOT NULL DEFAULT '' COMMENT '优惠券描述',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1显示 0隐藏)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序方式(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '软删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`coupon_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='优惠券记录表';
DROP TABLE IF EXISTS `yoshop_delivery`;
CREATE TABLE `yoshop_delivery` (
`delivery_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '模板ID',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '模板名称',
`method` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '计费方式(10按件数 20按重量)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序方式(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序d',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`delivery_id`,`is_delete`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='配送模板主表';
DROP TABLE IF EXISTS `yoshop_delivery_rule`;
CREATE TABLE `yoshop_delivery_rule` (
`rule_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '规则ID',
`delivery_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '配送模板ID',
`region` text NOT NULL COMMENT '可配送区域(城市id集)',
`region_text` text NOT NULL COMMENT '可配送区域(文字展示)',
`first` double unsigned NOT NULL DEFAULT '0' COMMENT '首件(个)/首重(Kg)',
`first_fee` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '运费(元)',
`additional` double unsigned NOT NULL DEFAULT '0' COMMENT '续件/续重',
`additional_fee` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '续费(元)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL COMMENT '创建时间',
PRIMARY KEY (`rule_id`),
KEY `delivery_id` (`delivery_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='配送模板区域及运费表';
DROP TABLE IF EXISTS `yoshop_express`;
CREATE TABLE `yoshop_express` (
`express_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '物流公司ID',
`express_name` varchar(255) NOT NULL DEFAULT '' COMMENT '物流公司名称',
`kuaidi100_code` varchar(30) NOT NULL DEFAULT '' COMMENT '物流公司编码 (快递100)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`express_id`),
KEY `store_id` (`store_id`),
KEY `kuaidi100_code` (`kuaidi100_code`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='物流公司记录表';
DROP TABLE IF EXISTS `yoshop_goods`;
CREATE TABLE `yoshop_goods` (
`goods_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品ID',
`goods_name` varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称',
`goods_no` varchar(50) NOT NULL DEFAULT '' COMMENT '商品编码',
`selling_point` varchar(500) NOT NULL DEFAULT '' COMMENT '商品卖点',
`spec_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '商品规格(10单规格 20多规格)',
`goods_price_min` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品价格(最低)',
`goods_price_max` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品价格(最高)',
`line_price_min` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '划线价格(最低)',
`line_price_max` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '划线价格(最高)',
`stock_total` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '库存总量(包含所有sku)',
`deduct_stock_type` tinyint(3) unsigned NOT NULL DEFAULT '20' COMMENT '库存计算方式(10下单减库存 20付款减库存)',
`content` longtext NOT NULL COMMENT '商品详情',
`sales_initial` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '初始销量',
`sales_actual` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '实际销量',
`delivery_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '配送模板ID',
`is_points_gift` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否开启积分赠送(1开启 0关闭)',
`is_points_discount` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否允许使用积分抵扣(1允许 0不允许)',
`is_alone_points_discount` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '积分抵扣设置(0默认抵扣 1单独设置抵扣)',
`points_discount_config` varchar(500) NOT NULL DEFAULT '' COMMENT '单独设置积分抵扣的配置',
`is_enable_grade` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否开启会员折扣(1开启 0关闭)',
`is_alone_grade` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '会员折扣设置(0默认等级折扣 1单独设置折扣)',
`alone_grade_equity` text COMMENT '单独设置折扣的配置',
`status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '商品状态(10上架 20下架)',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`goods_id`),
KEY `goods_no` (`goods_no`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品记录表';
DROP TABLE IF EXISTS `yoshop_goods_category_rel`;
CREATE TABLE `yoshop_goods_category_rel` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL COMMENT '商品ID',
`category_id` int(11) unsigned NOT NULL COMMENT '商品分类ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `store_id` (`store_id`),
KEY `goods_id` (`goods_id`),
KEY `category_id` (`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品与分类关系记录表';
DROP TABLE IF EXISTS `yoshop_goods_image`;
CREATE TABLE `yoshop_goods_image` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`image_id` int(11) NOT NULL COMMENT '图片id(关联文件记录表)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `goods_id` (`goods_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品图片记录表';
DROP TABLE IF EXISTS `yoshop_goods_service`;
CREATE TABLE `yoshop_goods_service` (
`service_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商品服务ID',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '服务名称',
`summary` varchar(500) NOT NULL DEFAULT '' COMMENT '概述',
`is_default` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否默认(新增商品时)',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1显示 0隐藏)',
`sort` int(11) unsigned NOT NULL DEFAULT '100' COMMENT '排序方式(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除(1已删除)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`service_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品服务与承诺记录表';
DROP TABLE IF EXISTS `yoshop_goods_service_rel`;
CREATE TABLE `yoshop_goods_service_rel` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL COMMENT '商品ID',
`service_id` int(11) unsigned NOT NULL COMMENT '服务承诺ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `store_id` (`store_id`),
KEY `goods_id` (`goods_id`),
KEY `service_id` (`service_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品与服务承诺关系记录表';
DROP TABLE IF EXISTS `yoshop_goods_sku`;
CREATE TABLE `yoshop_goods_sku` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '记录ID',
`goods_sku_id` varchar(255) NOT NULL DEFAULT '0' COMMENT '商品sku唯一标识 (由规格id组成)',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '规格图片ID',
`goods_sku_no` varchar(100) NOT NULL DEFAULT '' COMMENT '商品sku编码',
`goods_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品价格',
`line_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品划线价',
`stock_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '当前库存数量',
`goods_weight` double unsigned NOT NULL DEFAULT '0' COMMENT '商品重量(Kg)',
`goods_props` varchar(255) NOT NULL DEFAULT '' COMMENT 'SKU的规格属性(json格式)',
`spec_value_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '规格值ID集(json格式)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `sku_idx` (`goods_id`,`goods_sku_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品规格表';
DROP TABLE IF EXISTS `yoshop_goods_spec_rel`;
CREATE TABLE `yoshop_goods_spec_rel` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`spec_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '规格组ID',
`spec_value_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '规格值ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品与规格值关系记录表';
DROP TABLE IF EXISTS `yoshop_help`;
CREATE TABLE `yoshop_help` (
`help_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`title` varchar(255) NOT NULL DEFAULT '' COMMENT '帮助标题',
`content` text NOT NULL COMMENT '帮助内容',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除(1已删除)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`help_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='帮助中心记录表';
DROP TABLE IF EXISTS `yoshop_order`;
CREATE TABLE `yoshop_order` (
`order_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单ID',
`order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单号',
`total_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品总金额(不含优惠折扣)',
`order_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '订单金额(含优惠折扣)',
`coupon_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '优惠券ID',
`coupon_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券抵扣金额',
`points_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '积分抵扣金额',
`points_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '积分抵扣数量',
`pay_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际付款金额(包含运费)',
`update_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '后台修改的订单金额(差价)',
`buyer_remark` varchar(255) NOT NULL DEFAULT '' COMMENT '买家留言',
`pay_type` tinyint(3) unsigned NOT NULL DEFAULT '20' COMMENT '支付方式(10余额支付 20微信支付)',
`pay_status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '付款状态(10未付款 20已付款)',
`pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '付款时间',
`delivery_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '配送方式(10快递配送)',
`express_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '运费金额',
`express_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '物流公司ID',
`express_company` varchar(50) NOT NULL DEFAULT '' COMMENT '物流公司',
`express_no` varchar(50) NOT NULL DEFAULT '' COMMENT '物流单号',
`delivery_status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '发货状态(10未发货 20已发货)',
`delivery_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '发货时间',
`receipt_status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '收货状态(10未收货 20已收货)',
`receipt_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '收货时间',
`order_status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '订单状态(10进行中 20取消 21待取消 30已完成)',
`points_bonus` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '赠送的积分数量',
`is_settled` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '订单是否已结算(0未结算 1已结算)',
`transaction_id` varchar(30) NOT NULL DEFAULT '' COMMENT '微信支付交易号',
`is_comment` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '是否已评价(0否 1是)',
`order_source` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '订单来源(10普通订单)',
`order_source_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源记录ID',
`platform` varchar(20) NOT NULL DEFAULT '' COMMENT '来源客户端 (APP、H5、小程序等)',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`order_id`),
UNIQUE KEY `order_no` (`order_no`) USING BTREE,
KEY `store_id` (`store_id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='订单记录表';
DROP TABLE IF EXISTS `yoshop_order_address`;
CREATE TABLE `yoshop_order_address` (
`order_address_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '地址ID',
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '收货人姓名',
`phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
`province_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '省份ID',
`city_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '城市ID',
`region_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '区/县ID',
`detail` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
`order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`order_address_id`) USING BTREE,
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='订单收货地址记录表';
DROP TABLE IF EXISTS `yoshop_order_goods`;
CREATE TABLE `yoshop_order_goods` (
`order_goods_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品ID',
`goods_name` varchar(255) NOT NULL DEFAULT '' COMMENT '商品名称',
`image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品封面图ID',
`deduct_stock_type` tinyint(3) unsigned NOT NULL DEFAULT '20' COMMENT '库存计算方式(10下单减库存 20付款减库存)',
`spec_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '规格类型(10单规格 20多规格)',
`goods_sku_id` varchar(255) NOT NULL DEFAULT '' COMMENT '商品sku唯一标识',
`goods_props` varchar(255) NOT NULL DEFAULT '' COMMENT 'SKU的规格属性(json格式)',
`content` longtext NOT NULL COMMENT '商品详情',
`goods_no` varchar(100) NOT NULL DEFAULT '' COMMENT '商品编码',
`goods_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品价格(单价)',
`line_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品划线价',
`goods_weight` double unsigned NOT NULL DEFAULT '0' COMMENT '商品重量(Kg)',
`is_user_grade` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否存在会员等级折扣',
`grade_ratio` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '会员折扣比例(0-10)',
`grade_goods_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '会员折扣的商品单价',
`grade_total_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '会员折扣的总额差',
`coupon_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券折扣金额',
`points_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '积分金额',
`points_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '积分抵扣数量',
`points_bonus` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '赠送的积分数量',
`total_num` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '购买数量',
`total_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '商品总价(数量×单价)',
`total_pay_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际付款价(折扣和优惠后)',
`is_comment` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '是否已评价(0否 1是)',
`order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`goods_source_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '来源记录ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`order_goods_id`) USING BTREE,
KEY `goods_id` (`goods_id`),
KEY `order_id` (`order_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='订单商品记录表';
DROP TABLE IF EXISTS `yoshop_order_refund`;
CREATE TABLE `yoshop_order_refund` (
`order_refund_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '售后单ID',
`order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID',
`order_goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单商品ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '售后类型(10退货退款 20换货)',
`apply_desc` varchar(1000) NOT NULL DEFAULT '' COMMENT '用户申请原因(说明)',
`audit_status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '商家审核状态(0待审核 10已同意 20已拒绝)',
`refuse_desc` varchar(1000) NOT NULL DEFAULT '' COMMENT '商家拒绝原因(说明)',
`refund_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际退款金额',
`is_user_send` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '用户是否发货(0未发货 1已发货)',
`send_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户发货时间',
`express_id` varchar(32) NOT NULL DEFAULT '' COMMENT '用户发货物流公司ID',
`express_no` varchar(32) NOT NULL DEFAULT '' COMMENT '用户发货物流单号',
`is_receipt` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '商家收货状态(0未收货 1已收货)',
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '售后单状态(0进行中 10已拒绝 20已完成 30已取消)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`order_refund_id`),
KEY `order_id` (`order_id`),
KEY `order_goods_id` (`order_goods_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='售后单记录表';
DROP TABLE IF EXISTS `yoshop_order_refund_address`;
CREATE TABLE `yoshop_order_refund_address` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`order_refund_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '售后单ID',
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '收货人姓名',
`phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
`province_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在省份ID',
`city_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在城市ID',
`region_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '所在区/县ID',
`detail` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='售后单退货地址记录表';
DROP TABLE IF EXISTS `yoshop_order_refund_image`;
CREATE TABLE `yoshop_order_refund_image` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`order_refund_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '售后单ID',
`image_id` int(11) NOT NULL DEFAULT '0' COMMENT '图片id(关联文件记录表)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `order_refund_id` (`order_refund_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='售后单图片记录表';
DROP TABLE IF EXISTS `yoshop_page`;
CREATE TABLE `yoshop_page` (
`page_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '页面ID',
`page_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '页面类型(10首页 20自定义页)',
`page_name` varchar(255) NOT NULL DEFAULT '' COMMENT '页面名称',
`page_data` longtext NOT NULL COMMENT '页面数据',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '软删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`page_id`),
KEY `store_id` (`store_id`),
KEY `page_type` (`page_type`,`store_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='店铺页面记录表';
DROP TABLE IF EXISTS `yoshop_recharge_order`;
CREATE TABLE `yoshop_recharge_order` (
`order_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '订单ID',
`order_no` varchar(20) NOT NULL DEFAULT '' COMMENT '订单号',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`recharge_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '充值方式(10自定义金额 20套餐充值)',
`plan_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '充值套餐ID',
`pay_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '用户支付金额',
`gift_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '赠送金额',
`actual_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际到账金额',
`pay_status` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '支付状态(10待支付 20已支付)',
`pay_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '付款时间',
`transaction_id` varchar(30) NOT NULL DEFAULT '' COMMENT '微信支付交易号',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`order_id`),
KEY `order_no` (`order_no`),
KEY `user_id` (`user_id`),
KEY `plan_id` (`plan_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='会员充值订单表';
DROP TABLE IF EXISTS `yoshop_recharge_order_plan`;
CREATE TABLE `yoshop_recharge_order_plan` (
`order_plan_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`order_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '订单ID',
`plan_id` int(11) unsigned NOT NULL COMMENT '主键ID',
`plan_name` varchar(255) NOT NULL DEFAULT '' COMMENT '方案名称',
`money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '充值金额',
`gift_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '赠送金额',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`order_plan_id`),
KEY `order_id` (`order_id`),
KEY `plan_id` (`plan_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='会员充值订单套餐快照表';
DROP TABLE IF EXISTS `yoshop_recharge_plan`;
CREATE TABLE `yoshop_recharge_plan` (
`plan_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`plan_name` varchar(255) NOT NULL DEFAULT '' COMMENT '套餐名称',
`money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '充值金额',
`gift_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '赠送金额',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`plan_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='会员充值套餐表';
DROP TABLE IF EXISTS `yoshop_region`;
CREATE TABLE `yoshop_region` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '区划信息ID',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '区划名称',
`pid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级ID',
`code` varchar(255) NOT NULL DEFAULT '' COMMENT '区划编码',
`level` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '层级(1省级 2市级 3区/县级)',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='省市区数据表';
DROP TABLE IF EXISTS `yoshop_spec`;
CREATE TABLE `yoshop_spec` (
`spec_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '规格组ID',
`spec_name` varchar(255) NOT NULL DEFAULT '' COMMENT '规格组名称',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`spec_id`),
KEY `spec_name` (`spec_name`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品规格组记录表';
DROP TABLE IF EXISTS `yoshop_spec_value`;
CREATE TABLE `yoshop_spec_value` (
`spec_value_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '规格值ID',
`spec_value` varchar(255) NOT NULL COMMENT '规格值',
`spec_id` int(11) NOT NULL COMMENT '规格组ID',
`store_id` int(11) NOT NULL COMMENT '商城ID',
`create_time` int(11) NOT NULL COMMENT '创建时间',
PRIMARY KEY (`spec_value_id`),
KEY `spec_value` (`spec_value`),
KEY `spec_id` (`spec_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商品规格值记录表';
DROP TABLE IF EXISTS `yoshop_store`;
CREATE TABLE `yoshop_store` (
`store_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '商城ID',
`store_name` varchar(50) NOT NULL DEFAULT '' COMMENT '商城名称',
`describe` varchar(500) NOT NULL DEFAULT '' COMMENT '商城简介',
`logo_image_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城logo文件ID',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_recycle` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否回收',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家(商户)记录表';
DROP TABLE IF EXISTS `yoshop_store_address`;
CREATE TABLE `yoshop_store_address` (
`address_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '地址ID',
`type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '地址类型(10发货地址 20退货地址)',
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '联系人姓名',
`phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
`province_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '省份ID',
`city_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '城市ID',
`region_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '区/县ID',
`detail` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`address_id`),
KEY `type` (`type`),
KEY `store_id` (`store_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家地址记录表';
DROP TABLE IF EXISTS `yoshop_store_api`;
CREATE TABLE `yoshop_store_api` (
`api_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '权限名称',
`url` varchar(255) NOT NULL DEFAULT '' COMMENT '权限url',
`parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级ID',
`sort` int(11) unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`api_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家后台api权限表';
DROP TABLE IF EXISTS `yoshop_store_menu`;
CREATE TABLE `yoshop_store_menu` (
`menu_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
`module` tinyint(3) NOT NULL DEFAULT '10' COMMENT '模块类型(10菜单 20操作)',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '菜单名称',
`path` varchar(255) NOT NULL DEFAULT '' COMMENT '菜单路径(唯一)',
`action_mark` varchar(255) NOT NULL DEFAULT '' COMMENT '操作标识',
`parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上级菜单ID',
`sort` int(11) unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家后台菜单记录表';
DROP TABLE IF EXISTS `yoshop_store_menu_api`;
CREATE TABLE `yoshop_store_menu_api` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`menu_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '菜单ID',
`api_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户角色ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `menu_id` (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家后台用户角色与菜单权限关系表';
DROP TABLE IF EXISTS `yoshop_store_role`;
CREATE TABLE `yoshop_store_role` (
`role_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '角色ID',
`role_name` varchar(50) NOT NULL DEFAULT '' COMMENT '角色名称',
`parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '父级角色ID',
`sort` int(11) unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家用户角色表';
DROP TABLE IF EXISTS `yoshop_store_role_menu`;
CREATE TABLE `yoshop_store_role_menu` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`role_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户角色ID',
`menu_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '菜单ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `role_id` (`role_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家后台用户角色与菜单权限关系表';
DROP TABLE IF EXISTS `yoshop_store_setting`;
CREATE TABLE `yoshop_store_setting` (
`key` varchar(30) NOT NULL COMMENT '设置项标示',
`describe` varchar(255) NOT NULL DEFAULT '' COMMENT '设置项描述',
`values` mediumtext NOT NULL COMMENT '设置内容(json格式)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
UNIQUE KEY `unique_key` (`key`,`store_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='商家设置记录表';
DROP TABLE IF EXISTS `yoshop_store_user`;
CREATE TABLE `yoshop_store_user` (
`store_user_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_name` varchar(255) NOT NULL DEFAULT '' COMMENT '用户名',
`password` varchar(255) NOT NULL DEFAULT '' COMMENT '登录密码',
`real_name` varchar(255) NOT NULL DEFAULT '' COMMENT '姓名',
`is_super` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否为超级管理员',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`sort` int(11) unsigned NOT NULL DEFAULT '100' COMMENT '排序(数字越小越靠前)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`store_user_id`),
KEY `user_name` (`user_name`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家用户记录表';
DROP TABLE IF EXISTS `yoshop_store_user_role`;
CREATE TABLE `yoshop_store_user_role` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`store_user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '超管用户ID',
`role_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '角色ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`),
KEY `store_user_id` (`store_user_id`) USING BTREE,
KEY `role_id` (`role_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='商家用户角色记录表';
DROP TABLE IF EXISTS `yoshop_upload_file`;
CREATE TABLE `yoshop_upload_file` (
`file_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '文件ID',
`group_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '文件分组ID',
`channel` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '上传来源(10商户后台 20用户端)',
`storage` varchar(10) NOT NULL DEFAULT '' COMMENT '存储方式',
`domain` varchar(255) NOT NULL DEFAULT '' COMMENT '存储域名',
`file_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '文件类型(10图片 20附件 30视频)',
`file_name` varchar(255) NOT NULL DEFAULT '' COMMENT '文件名称(仅显示)',
`file_path` varchar(255) NOT NULL DEFAULT '' COMMENT '文件路径',
`file_size` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '文件大小(字节)',
`file_ext` varchar(20) NOT NULL DEFAULT '' COMMENT '文件扩展名',
`cover` varchar(255) NOT NULL DEFAULT '' COMMENT '文件封面',
`uploader_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上传者用户ID',
`is_recycle` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否在回收站',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`file_id`),
KEY `group_id` (`group_id`),
KEY `is_recycle` (`is_recycle`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='文件库记录表';
DROP TABLE IF EXISTS `yoshop_upload_group`;
CREATE TABLE `yoshop_upload_group` (
`group_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '分组ID',
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '分组名称',
`parent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上级分组ID',
`sort` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '排序(数字越小越靠前)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`group_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='文件库分组记录表';
DROP TABLE IF EXISTS `yoshop_user`;
CREATE TABLE `yoshop_user` (
`user_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID',
`mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '用户手机号',
`nick_name` varchar(255) NOT NULL DEFAULT '' COMMENT '用户昵称',
`avatar_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '头像文件ID',
`gender` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '性别',
`country` varchar(50) NOT NULL DEFAULT '' COMMENT '国家',
`province` varchar(50) NOT NULL DEFAULT '' COMMENT '省份',
`city` varchar(50) NOT NULL DEFAULT '' COMMENT '城市',
`address_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '默认收货地址',
`balance` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '用户可用余额',
`points` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户可用积分',
`pay_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '用户总支付的金额',
`expend_money` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '实际消费的金额(不含退款)',
`grade_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员等级ID',
`platform` varchar(20) NOT NULL DEFAULT '' COMMENT '注册来源的平台 (APP、H5、小程序等)',
`last_login_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '最后登录时间',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`user_id`),
KEY `mobile` (`mobile`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户记录表';
DROP TABLE IF EXISTS `yoshop_user_address`;
CREATE TABLE `yoshop_user_address` (
`address_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '收货人姓名',
`phone` varchar(20) NOT NULL DEFAULT '' COMMENT '联系电话',
`province_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '省份ID',
`city_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '城市ID',
`region_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '区/县ID',
`detail` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`address_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户收货地址表';
DROP TABLE IF EXISTS `yoshop_user_balance_log`;
CREATE TABLE `yoshop_user_balance_log` (
`log_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`scene` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '余额变动场景(10用户充值 20用户消费 30管理员操作 40订单退款)',
`money` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '变动金额',
`describe` varchar(500) NOT NULL DEFAULT '' COMMENT '描述/说明',
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '管理员备注',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`log_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户余额变动明细表';
DROP TABLE IF EXISTS `yoshop_user_coupon`;
CREATE TABLE `yoshop_user_coupon` (
`user_coupon_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`coupon_id` int(11) unsigned NOT NULL COMMENT '优惠券ID',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT '优惠券名称',
`coupon_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '优惠券类型(10满减券 20折扣券)',
`reduce_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '满减券-减免金额',
`discount` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '折扣券-折扣率(0-100)',
`min_price` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '最低消费金额',
`expire_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '到期类型(10领取后生效 20固定时间)',
`expire_day` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '领取后生效-有效天数',
`start_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效期开始时间',
`end_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '有效期结束时间',
`apply_range` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '适用范围(10全部商品 20指定商品)',
`apply_range_config` text COMMENT '适用范围配置(json格式)',
`is_expire` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否过期(0未过期 1已过期)',
`is_use` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否已使用(0未使用 1已使用)',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`user_coupon_id`),
KEY `coupon_id` (`coupon_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户优惠券记录表';
DROP TABLE IF EXISTS `yoshop_user_grade`;
CREATE TABLE `yoshop_user_grade` (
`grade_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '等级ID',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '等级名称',
`weight` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '等级权重(1-9999)',
`upgrade` text NOT NULL COMMENT '升级条件',
`equity` text NOT NULL COMMENT '等级权益(折扣率0-100)',
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态(1启用 0禁用)',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`grade_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户会员等级表';
DROP TABLE IF EXISTS `yoshop_user_grade_log`;
CREATE TABLE `yoshop_user_grade_log` (
`log_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`old_grade_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '变更前的等级ID',
`new_grade_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '变更后的等级ID',
`change_type` tinyint(3) unsigned NOT NULL DEFAULT '10' COMMENT '变更类型(10后台管理员设置 20自动升级)',
`remark` varchar(500) DEFAULT '' COMMENT '管理员备注',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`log_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户会员等级变更记录表';
DROP TABLE IF EXISTS `yoshop_user_oauth`;
CREATE TABLE `yoshop_user_oauth` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`oauth_type` varchar(255) NOT NULL DEFAULT '' COMMENT '第三方登陆类型(MP-WEIXIN)',
`oauth_id` varchar(100) NOT NULL DEFAULT '' COMMENT '第三方用户唯一标识 (uid openid)',
`unionid` varchar(100) NOT NULL DEFAULT '' COMMENT '微信unionID',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `oauth_type` (`oauth_type`),
KEY `store_id` (`store_id`),
KEY `oauth_type_2` (`oauth_type`,`oauth_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10108 DEFAULT CHARSET=utf8 COMMENT='第三方用户信息表';
DROP TABLE IF EXISTS `yoshop_user_points_log`;
CREATE TABLE `yoshop_user_points_log` (
`log_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
`value` int(11) NOT NULL DEFAULT '0' COMMENT '变动数量',
`describe` varchar(500) NOT NULL DEFAULT '' COMMENT '描述/说明',
`remark` varchar(500) NOT NULL DEFAULT '' COMMENT '管理员备注',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '小程序商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`log_id`),
KEY `user_id` (`user_id`),
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='用户积分变动明细表';
DROP TABLE IF EXISTS `yoshop_wxapp`;
CREATE TABLE `yoshop_wxapp` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '微信小程序ID',
`app_id` varchar(50) NOT NULL DEFAULT '' COMMENT '小程序AppID',
`app_secret` varchar(50) NOT NULL DEFAULT '' COMMENT '小程序AppSecret',
`mchid` varchar(50) NOT NULL DEFAULT '' COMMENT '微信商户号ID',
`apikey` varchar(255) NOT NULL DEFAULT '' COMMENT '微信支付密钥',
`cert_pem` longtext COMMENT '证书文件cert',
`key_pem` longtext COMMENT '证书文件key',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
`update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `store_id` (`store_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='微信小程序记录表(已废弃)';
DROP TABLE IF EXISTS `yoshop_order_export`;
CREATE TABLE `yoshop_order_export` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`start_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '下单时间(开始)',
`end_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '下单时间(结束)',
`file_path` varchar(255) NOT NULL DEFAULT '' COMMENT 'excel文件路径',
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '导出状态(10进行中 20已完成 30失败)',
`store_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `store_id` (`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COMMENT='订单导出Excel记录表';
DROP TABLE IF EXISTS `yoshop_wxapp_setting`;
CREATE TABLE `yoshop_wxapp_setting` (
`key` varchar(30) NOT NULL DEFAULT '' COMMENT '设置项标示',
`describe` varchar(255) NOT NULL DEFAULT '' COMMENT '设置项描述',
`values` mediumtext NOT NULL COMMENT '设置内容(json格式)',
`store_id` int unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
UNIQUE KEY `unique_key` (`key`,`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='微信小程序设置表';
DROP TABLE IF EXISTS `yoshop_h5_setting`;
CREATE TABLE `yoshop_h5_setting` (
`key` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '设置项标示',
`describe` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '设置项描述',
`values` mediumtext CHARACTER SET utf8 NOT NULL COMMENT '设置内容(json格式)',
`store_id` int unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
`update_time` int unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
UNIQUE KEY `unique_key` (`key`,`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='H5端设置表';
ALTER TABLE `yoshop_goods`
ADD COLUMN `video_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '主图视频ID' AFTER `goods_no`,
ADD COLUMN `video_cover_id` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '主图视频ID' AFTER `video_id`;
+369
View File
@@ -0,0 +1,369 @@
<?php
// +----------------------------------------------------------------------
// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2023 https://www.yiovo.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
// +----------------------------------------------------------------------
// | Author: 萤火科技 <admin@yiovo.com>
// +----------------------------------------------------------------------
header('Content-Type:text/html; charset=utf-8');
// 检测php版本号
if (phpversion() < '7.1') {
exit('很抱歉,由于您的PHP版本过低,不能安装本软件,为了系统功能全面可用,请升级到PHP7.1或更高版本再安装,谢谢!');
}
// 不限制响应时间
// error_reporting(0);
set_time_limit(0);
// 设置系统路径
define('IN_INSTALL', true);
define('INSTALL_PATH', str_replace('\\', '/', dirname(__FILE__)));
define('ROOT_PATH', dirname(INSTALL_PATH, 2));
// 版权信息设置
$cfg_copyright = '© 2018-2023';
// 获取当前步骤
$s = getStep();
// 提示已经安装
if (is_file(INSTALL_PATH . '/install.lock') && $s != md5('done')) {
require_once(INSTALL_PATH . '/templates/step_5.php');
exit();
}
// 执行相应操作
$GLOBALS['isNext'] = true;
// 获取当前步骤
function getStep()
{
$s1 = $_GET['s'] ?? 0;
// 初始化参数
$s2 = $_POST['s'] ?? 0;
// 如果有GET值则覆盖POST值
if ($s1 > 0 && in_array($s1, [1, 63832, md5('done')])) {
$s2 = $s1;
}
return $s2;
}
// 协议说明
if ($s == 0) {
require_once(INSTALL_PATH . '/templates/step_0.php');
exit();
}
// 环境检测
if ($s == 1) {
// 获取检测的路径数据
$iswrite_array = getIsWriteArray();
// 获取检测的函数数据
$exists_array = getExistsFuncArray();
// 获取扩展要求数据
$extendArray = getExtendArray();
// 引入环境检测html
require_once(INSTALL_PATH . '/templates/step_1.php');
exit();
}
// 配置文件
if ($s == 2) {
require_once(INSTALL_PATH . '/templates/step_2.php');
exit();
}
// 正在安装
if ($s == 3) {
require_once(INSTALL_PATH . '/templates/step_3.php');
if ($_POST['s'] == 3) {
// 初始化信息
$dbhost = $_POST['dbhost'] ?? '';
$dbname = $_POST['dbname'] ?? '';
$dbuser = $_POST['dbuser'] ?? '';
$dbpwd = $_POST['dbpwd'] ?? '';
$dbport = $_POST['dbport'] ?? 3306;
$testdata = $_POST['testdata'] ?? '';
// 连接证数据库
try {
$dsn = "mysql:host={$dbhost};port={$dbport};charset=utf8";
$pdo = new PDO($dsn, $dbuser, $dbpwd);
$pdo->query("SET NAMES utf8"); // 设置数据库编码
} catch (Exception $e) {
insError('数据库连接错误,请检查!');
}
// 查询数据库
$res = $pdo->query('show Databases');
// 遍历所有数据库,存入数组
$dbnameArr = [];
foreach ($res->fetchAll(PDO::FETCH_ASSOC) as $row) {
$dbnameArr[] = $row['Database'];
}
// 检查数据库是否存在,没有则创建数据库
if (!in_array(trim($dbname), $dbnameArr)) {
if (!$pdo->exec("CREATE DATABASE `$dbname`")) {
insError("创建数据库失败,请检查权限或联系管理员!");
}
}
// 数据库创建完成,开始连接
$pdo->query("USE `$dbname`");
// 取出.env模板内容
$config_str = readDataFile('.env.tpl');
// 进行替换
$config_str = str_replace('~db_host~', $dbhost, $config_str);
$config_str = str_replace('~db_name~', $dbname, $config_str);
$config_str = str_replace('~db_user~', $dbuser, $config_str);
$config_str = str_replace('~db_pwd~', $dbpwd, $config_str);
$config_str = str_replace('~db_port~', $dbport, $config_str);
$config_str = str_replace('~db_charset~', 'utf8', $config_str);
// 将替换后的内容写入.env文件
$fp = fopen(ROOT_PATH . '/.env', 'w');
fwrite($fp, $config_str);
fclose($fp);
// 防止浏览器缓存
$buffer = ini_get('output_buffering');
echo str_repeat(' ', $buffer + 1);
insInfo("数据库连接文件创建完成!");
ob_flush();
flush();
// 创建表结构
$tbstruct = readDataFile('install_struct.sql');
$pdo->exec(trim($tbstruct));
insInfo("数据库结构导入完成!");
ob_flush();
flush();
// 导入其他安装数据
$data_str = readDataFile('install_data.sql');
$pdo->exec(trim($data_str));
insInfo("商城默认数据导入完成!");
ob_flush();
flush();
// 查看是否需要安装测试数据
if ($testdata == 'true') {
insInfo("正在加载测试数据!");
ob_flush();
flush();
$sqlstr_file = readDataFile('install_testdata.sql');
$pdo->exec(trim($sqlstr_file));
insInfo("测试数据导入完成!");
ob_flush();
flush();
}
// 结束缓存区
ob_end_flush();
// 安装完成进行跳转
echo '<script>setTimeout(function () { location.href="?s=' . md5('done') . '"; }, 2000)</script>';
exit();
}
exit();
}
// 检测数据库信息
if ($s == 63832) {
$dbhost = $_GET['dbhost'] ?? '';
$dbuser = $_GET['dbuser'] ?? '';
$dbpwd = $_GET['dbpwd'] ?? '';
$dbport = $_GET['dbport'] ?? '';
try {
$dsn = "mysql:host=$dbhost;port={$dbport};charset=utf8";
$pdo = new PDO($dsn, $dbuser, $dbpwd);
echo 'true';
} catch (Exception $e) {
echo 'false';
}
exit();
}
// 安装完成
if ($s == md5('done')) {
require_once(INSTALL_PATH . '/templates/step_4.php');
$fp = fopen(INSTALL_PATH . '/install.lock', 'w');
fwrite($fp, '程序已正确安装,重新安装请删除本文件');
fclose($fp);
exit();
}
// 获取扩展要求数据
function getExtendArray()
{
$data = [
[
'name' => 'PDO Mysql',
'status' => extension_loaded('PDO') && extension_loaded('pdo_mysql'),
],
[
'name' => 'Mysqlnd',
'status' => extension_loaded('mysqlnd'),
],
[
'name' => 'JSON',
'status' => extension_loaded('json')
],
[
'name' => 'Fileinfo',
'status' => extension_loaded('fileinfo')
],
[
'name' => 'CURL',
'status' => extension_loaded('curl'),
],
[
'name' => 'OpenSSL',
'status' => extension_loaded('openssl'),
],
[
'name' => 'GD',
'status' => extension_loaded('gd'),
],
[
'name' => 'BCMath',
'status' => extension_loaded('bcmath'),
],
[
'name' => 'Mbstring',
'status' => extension_loaded('mbstring'),
],
[
'name' => 'SimpleXML',
'status' => extension_loaded('SimpleXML'),
],
];
foreach ($data as $item) {
!$item['status'] && setIsNext(false);
}
return $data;
}
// 检测php版本号
function getPHPVersion()
{
$version = phpversion();
$versionInt = versionToInteger(phpversion());
if ($versionInt < 70400 || $versionInt >= 70500) {
echo "<span class=\"col-red\"><strong>{$version}</strong> (请使用php7.4)</span>";
setIsNext(false);
} else {
echo "<span>{$version}</span>";
}
}
/**
* 将版本转为数字
* @param string $version
* @return int
*/
function versionToInteger(string $version): int
{
list($major, $minor, $sub) = explode('.', $version);
return intval($major * 10000 + $minor * 100 + $sub);
}
// 获取检测的路径数据
function getIsWriteArray()
{
return [
'/.env',
// '/data/',
'/public/install/',
'/public/uploads/',
'/public/temp/',
];
}
// 获取检测的函数数据
function getExistsFuncArray()
{
return ['curl_init', 'bcadd', 'mb_substr', 'simplexml_load_string'];
}
// 测试可写性
function isWrite($file)
{
if (is_writable(ROOT_PATH . $file)) {
echo '<span>可写</span>';
} else {
echo '<span class="col-red">不可写</span>';
setIsNext(false);
}
}
// 测试函数是否存在
function isFunExists($func)
{
$state = function_exists($func);
if ($state === false) {
setIsNext(false);
}
return $state;
}
// 测试函数是否存在
function isFunExistsTxt($func)
{
if (isFunExists($func)) {
echo '<span>无</span>';
} else {
echo '<span class="col-red">需安装</span>';
setIsNext(false);
}
}
// 清除txt中的BOM
function clearBOM($contents)
{
$charset[1] = substr($contents, 0, 1);
$charset[2] = substr($contents, 1, 1);
$charset[3] = substr($contents, 2, 1);
if (ord($charset[1]) == 239 &&
ord($charset[2]) == 187 &&
ord($charset[3]) == 191) {
return substr($contents, 3);
} else {
return $contents;
}
}
// 设置是否允许下一步
function setIsNext(bool $bool)
{
$GLOBALS['isNext'] = $bool;
}
// 获取data文件夹中的文件内容
function readDataFile(string $file)
{
return file_get_contents(INSTALL_PATH . '/data/' . $file);
}
function insInfo($str)
{
echo '<script>$("#install").append("' . $str . '<br>");</script>';
}
function insError($str, $isExit = false)
{
insInfo("<span class='col-red'>$str</span>");
exit();
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

@@ -0,0 +1,140 @@
$(function () {
$(".input").focus(function () {
$(this).attr("class", "inputOn");
}).blur(function () {
$(this).attr("class", "input");
});
$("#dbhost").focus();
})
function CheckForm() {
var format = /^[a-zA-Z0-9_@!.-]+$/;
if ($("#dbhost").val() == "") {
alert("请输入数据库服务器!");
$("#dbhost").focus();
return false;
}
if ($("#dbname").val() == "") {
alert("请输入数据库名!");
$("#dbname").focus();
return false;
}
if (!format.exec($("#dbname").val())) {
alert("数据库名非法!请使用[a-zA-Z0-9_@!.-]内的字符!!");
$("#dbname").focus();
return false;
}
if ($("#dbuser").val() == "") {
alert("请输入数据库用户!");
$("#dbuser").focus();
return false;
}
// if ($("#username").val() == "") {
// alert("请输入管理员账号!");
// $("#username").focus();
// return false;
// }
//
// if ($("#username").val().length < 5 ||
// $("#username").val().length > 20) {
// alert("用户名长度不得小于5位或大于20位!");
// $("#username").focus();
// return false;
// }
//
// if ($("#password").val() == "") {
// alert("请输入管理员密码!");
// $("#password").focus();
// return false;
// }
//
// if ($("#password").val().length < 5 ||
// $("#password").val().length > 16) {
// alert("密码由5-16个字符组成,区分大小写!");
// $("#password").focus();
// return false;
// }
//
// if ($("#repassword").val() == "") {
// alert("请输入重复密码!");
// $("#repassword").focus();
// return false;
// }
//
// if ($("#password").val() != $("#repassword").val()) {
// alert("两次密码不同!");
// $("#repassword").focus();
// return false;
// }
if ($("#cpwd").val() == "false") {
$.ajax({
url: 'index.php',
data: {
s: 63832,
dbhost: $("#dbhost").val(),
dbuser: $("#dbuser").val(),
dbpwd: $("#dbpwd").val(),
},
type: 'get',
dataType: 'html',
success: function (data) {
if (data == 'true') {
$('#cpwdTxt').html('<span class="correct">可用</span>');
$('#cpwd').val("true");
//验证没有问题,提交表单
document.form.submit();
return;
} else {
$('#cpwdTxt').html('<span class="error">不可用</span>');
$("#dbpwd").focus();
$('#cpwd').val("false");
return false;
}
}
});
} else {
//验证没有问题,提交表单
document.form.submit();
return;
}
}
/**
* 验证数据库账号密码是否正确
* @constructor
*/
function CheckPwd() {
$.ajax({
url: 'index.php',
data: {
s: 63832,
dbhost: $("#dbhost").val(),
dbport: $("#dbport").val(),
dbuser: $("#dbuser").val(),
dbpwd: $("#dbpwd").val(),
},
type: 'get',
dataType: 'html',
success: function (data) {
if (data === 'true') {
$('#cpwdTxt').html('<span class="correct">可用</span>');
$('#cpwd').val("true");
} else {
$('#cpwdTxt').html('<span class="error">不可用</span>');
$('#cpwd').val("false");
}
}
});
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,57 @@
<?php if (!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>萤火商城系统 安装向导 - 协议说明</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
</head>
<body>
<div class="header"></div>
<div class="mainBody">
<div class="text">
<h3>软件许可协议</h3>
<p>尊敬的用户:</p>
<div class="hr_8"></div>
<p>感谢您选择萤火商城,希望我们的努力能为您提供一款适用于企业级电商零售的利器,萤火商城官方网站为 <a href="https://www.yiovo.com" target="_blank">https://www.yiovo.com</a>。
</p>
<div class="hr_8"></div>
<p>萤火商城系统(以下称“本系统”),由烟台晴好网络科技有限公司(以下称“萤火科技”)自主研发,版权所有Copyright (c)2018-2021,萤火科技保留所有权利。</p>
<p>
使用者无论个人或组织、盈利与否、用途如何(包括以学习和研究为目的),均需仔细阅读本协议,在理解、同意、并遵守本协议的全部条款后,方可开始使用本系统。本授权协议适用且仅适用于本产品,萤火科技拥有对本授权协议的最终解释权。</p>
<div class="hr_8"></div>
<h4>一. 协议许可的权利</h4>
<p>您可以在完全遵守本最终用户授权协议的基础上,安装和使用本系统提供的全部功能,而不必支付软件版权授权费用。</p>
<p>您可以在协议规定的约束和限制范围内修改本系统源代码或界面风格以适应您的使用要求,但需保留本系统的版权信息和链接。</p>
<p>您拥有使用本系统构建的应用中全部会员资料、内容及相关信息的所有权,并独立承担相关法律义务。</p>
<div class="hr_8"></div>
<h4>二. 协议规定的约束和限制</h4>
<p>未经我们书面许可,您不得删除或修改本系统页面中的版权信息及相应的官方链接(无论用途如何、是否经过修改或美化、修改程度如何)。</p>
<p>您不得在本系统的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。</p>
<p>您不得通过分解软件,把不同功能或把软件的不同部分嵌入到其他软件系统。</p>
<p>如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。</p>
<div class="hr_8"></div>
<h4>三. 有限担保和免责声明</h4>
<p>
本系统及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。用户出于自愿而使用本系统,您必须了解使用本系统的风险,在尚未购买产品技术服务之前,我们不承诺提供任何形式的技术支持、使用担保,也不承担任何因使用本系统而产生问题的相关责任。萤火科技不对使用本系统构建的网站和应用中的内容或信息承担责任。
</p>
<div class="hr_8"></div>
<p>本系统受著作权法、国际著作权条约和其他的知识产权法律或国际条约保护。根据本协议,在此仅许可您非独占性的、非排他性的一般许可使用该软件的权利,而不是出售或转让。</p>
<div class="hr_8"></div>
<p>
有关本系统最终用户授权协议、商业授权与技术服务的详细内容,均由萤火官方网站独家提供。萤火科技拥有在不事先通知的情况下,修改授权协议和服务价目表的权力,修改后的协议对自改变之日起的新授权用户生效。</p>
<div class="hr_8"></div>
<p>
电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始安装本系统,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。</p>
</div>
</div>
<div class="footer"><span class="step"></span> <span class="copyright"><?php echo $cfg_copyright; ?></span> <span
class="formSubBtn"> <a href="javascript:void(0);" onclick="window.close();return false;"
class="back">不同意</a> <a href="?s=1" class="submit">同 意</a> </span></div>
</body>
</html>
@@ -0,0 +1,157 @@
<?php if (!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>萤火商城 安装向导 - 检测安装环境</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
</head>
<body>
<div class="header"></div>
<div class="mainBody">
<div class="forms">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left" class="head">
<td width="30%" height="36">项目
</th>
<td width="30%">所需配置
</th>
<td width="15%">推荐配置
</th>
<td width="25%" align="right">当前服务器
</th>
</tr>
<tr>
<td height="26" class="firstCol">操作系统</td>
<td>不限制</td>
<td>Linux</td>
<td class="endCol"><?php echo PHP_OS; ?></td>
</tr>
<tr>
<td height="26" class="firstCol">PHP 版本</td>
<td>7.4</td>
<td>7.4</td>
<td class="endCol"><?php echo getPHPVersion(); ?></td>
</tr>
<tr>
<td height="26" class="firstCol">附件上传</td>
<td>2M</td>
<td>2M</td>
<td class="endCol"><?php echo get_cfg_var("upload_max_filesize") ?: '不允许上传附件'; ?></td>
</tr>
<tr>
<td height="26" class="firstCol">GD 库</td>
<td>2.0</td>
<td>2.1</td>
<td class="endCol"><?php
$gdInfo = function_exists('gd_info') ? gd_info() : [];
echo empty($gdInfo['GD Version']) ? 'noext' : $gdInfo['GD Version'];
?></td>
</tr>
<tr>
<td height="26" class="firstCol">磁盘空间</td>
<td>100M</td>
<td>不限制</td>
<td class="endCol">
<?php
if (function_exists('disk_free_space')) {
echo floor(disk_free_space('../') / (1024 * 1024)) . 'M';
} else {
echo 'unknow';
}
?>
</td>
</tr>
</table>
<div class="hr_10"></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left" class="head">
<td width="60%" height="36">扩展要求
</th>
<td width="25%">检查结果
</th>
<td width="15%" align="right">建议
</th>
</tr>
<?php foreach ($extendArray as $item): ?>
<tr>
<td height="26" class="firstCol"><?= $item['name'] ?></td>
<td><?= $item['status'] ? '支持' : '不支持' ?></td>
<td class="endCol">
<span class="<?= $item['status'] ? '' : 'col-red' ?>"><?= $item['status'] ? '无' : '需安装' ?></span>
</td>
</tr>
<?php endforeach ?>
</table>
<div class="hr_10"></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left" class="head">
<td width="60%" height="36">函数名称
</th>
<td width="25%">检查结果
</th>
<td width="15%" align="right">建议
</th>
</tr>
<?php foreach ($exists_array as $v): ?>
<tr>
<td height="26" class="firstCol"><?php echo $v; ?>()</td>
<td><?= isFunExists($v) ? '支持' : '不支持' ?></td>
<td class="endCol"><?= isFunExistsTxt($v) ?></td>
</tr>
<?php endforeach ?>
</table>
<div class="hr_10"></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr align="left" class="head">
<td width="60%" height="36">文件权限检测
</th>
<td width="25%">所需状态
</th>
<td width="15%" align="right">当前状态
</th>
</tr>
<?php
foreach ($iswrite_array as $v) {
?>
<tr align="left">
<td height="26" class="firstCol"><?php echo $v; ?></td>
<td>可写</td>
<td class="endCol"><?php isWrite($v); ?></td>
</tr>
<?php
}
?>
</table>
</div>
</div>
<div class="footer">
<span class="step2"></span>
<span class="copyright"><?= $cfg_copyright; ?></span>
<span class="formSubBtn">
<form class="j-form" method="post" action="index.php">
<a href="javascript:void(0);" onclick="history.go(-1);return false;" class="back">返 回</a>
<a href="javascript:void(0);" class="j-submit submit">下一步</a>
<input type="hidden" name="s" id="s" value="2">
</form>
</span>
</div>
<script>
$(function () {
// 环境检测是否通过
var isPass = <?= $GLOBALS['isNext'] ? 'true' : 'false' ?>;
console.log(isPass)
// 表单提交
$('.j-submit').click(function () {
if (isPass) {
$('.j-form').submit();
} else {
alert('环境检测不通过,请先修复');
}
})
})
</script>
</body>
</html>
@@ -0,0 +1,82 @@
<?php if (!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>萤火商城 安装向导 - 配置数据文件</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
<script type="text/javascript" src="templates/js/forms.js"></script>
</head>
<body>
<form name="form" id="form" method="post" action="index.php">
<div class="header"></div>
<div class="mainBody">
<div class="table">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="40" colspan="2" align="left"><span class="title">填写数据库信息</span></td>
</tr>
<tr>
<td width="30%" height="40" align="right">数据库服务器:</td>
<td><input type="text" name="dbhost" id="dbhost" class="input" value="localhost"/>
<span class="cnote">数据库服务器地址, 一般为 localhost</span></td>
</tr>
<tr>
<td width="30%" height="40" align="right">数据库端口号:</td>
<td>
<input type="text" name="dbport" id="dbport" class="input" value="3306"/>
<span class="cnote">数据库端口号, 一般为 3306</span>
</td>
</tr>
<tr>
<td height="40" align="right">数据库名称:</td>
<td>
<input type="text" name="dbname" id="dbname" class="input" value="yoshop2_db"/>
<span class="cnote">数据库的名称,如果没有请先新增</span>
</td>
</tr>
<tr>
<td height="40" align="right">数据库用户名:</td>
<td><input type="text" name="dbuser" id="dbuser" class="input" value="root"/></td>
</tr>
<tr>
<td height="40" align="right">数据库密码:</td>
<td><input type="password" name="dbpwd" id="dbpwd" class="input" onblur="CheckPwd()"/>
<span class="cnote"><span id="cpwdTxt"></span></span>
<input type="hidden" name="cpwd" id="cpwd" value="false"></td>
</tr>
<tr>
<td height="40" colspan="2" align="left"><span class="title">默认管理员信息</span></td>
</tr>
<tr>
<td height="40" align="right">管理员账号:</td>
<td>
<div class="readonly">admin</div>
</td>
</tr>
<tr>
<td height="40" align="right">管理员密码:</td>
<td>
<div class="readonly">yinghuo</div>
</td>
</tr>
<!-- <tr>-->
<!-- <td height="40" align="right">安装测试数据:</td>-->
<!-- <td><input type="checkbox" name="testdata" value="true" checked="checked"/>-->
<!-- 是-->
<!-- </td>-->
<!-- </tr>-->
</table>
</div>
</div>
<div class="footer"><span class="step3"></span> <span class="copyright"><?php echo $cfg_copyright; ?></span> <span
class="formSubBtn"> <a href="javascript:void(0);" onclick="history.go(-1);return false;" class="back">返 回</a> <a
href="javascript:void(0);" onclick="CheckForm();return false;" class="submit">开始安装</a>
<input type="hidden" name="s" id="s" value="3">
</span></div>
</form>
</body>
</html>
@@ -0,0 +1,21 @@
<?php if(!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>萤火商城 安装向导 - 执行配置文件</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
</head>
<body>
<div class="header"></div>
<div class="mainBody">
<div class="text">
<h4>正在安装...</h4>
<div id="install"></div>
</div>
</div>
<div class="footer"> <span class="step3"></span> <span class="copyright"><?php echo $cfg_copyright; ?></span> </div>
</body>
</html>
@@ -0,0 +1,22 @@
<?php if(!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>萤火商城 安装向导 - 安装成功</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
</head>
<body>
<div class="header"></div>
<div class="mainBody">
<div class="note">
<div class="complete"><strong>现在您可以:</strong><br />
<a href="../">访问首页</a><span>或</span><a href="../admin/">登录后台</a><br /><br />
您可以访问 <a href="https://www.yiovo.com/" target="_blank" class="link">yiovo.com</a> 获取更多帮助 </div>
</div>
</div>
<div class="footer"> <span class="step4"></span> <span class="copyright"><?php echo $cfg_copyright; ?></span></div>
</body>
</html>
@@ -0,0 +1,22 @@
<?php if(!defined('IN_INSTALL')) exit('Request Error!'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>萤火商城 安装向导 - 程序已安装</title>
<link href="templates/style/install.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="templates/js/jquery.min.js"></script>
<script type="text/javascript" src="templates/js/common.js"></script>
</head>
<body>
<div class="header"></div>
<div class="mainBody">
<div class="note">
<div class="complete"><strong>现在您可以:</strong><br />
<a href="../">访问首页</a><span>或</span><a href="../admin/">登录后台</a><br /><br />
您可以访问 <a href="https://www.yiovo.com/" target="_blank" class="link">yiovo.com</a> 获取更多帮助 </div>
</div>
</div>
<div class="footer"> <span class="step4"></span> <span class="copyright"><?php echo $cfg_copyright; ?></span></div>
</body>
</html>
@@ -0,0 +1,346 @@
@charset "utf-8";
/* 全局控制 */
html {
/*overflow: hidden;*/
}
body {
margin: 0;
padding: 0;
font-family: "微软雅黑", Arial, "宋体";
font-size: 13px;
color: #333;
}
html, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td, p {
margin: 0;
padding: 0;
}
input, select, textarea {
vertical-align: middle;
font-family: "微软雅黑", Arial, "宋体";
font-size: 12px;
}
img {
border: 0;
}
ul, li {
list-style-type: none;
}
a {
color: #333;
text-decoration: none;
}
a:hover {
text-decoration: underline;
color: #333;
}
a:focus {
outline: none;
}
a {
transition-duration: 300ms;
}
/*全局函数*/
.hr_1, .hr_8, .hr_10 {
font-size: 1px;
line-height: 1px;
clear: both;
overflow: hidden;
}
.hr_1 {
height: 1px;
}
.hr_8 {
height: 8px;
}
.hr_10 {
height: 10px;
}
.col-red {
color: red;
}
/*定义新型浏览器特性*/
::-webkit-scrollbar {
width: 10px;
height: 10px
}
::-webkit-scrollbar-button:vertical {
display: none
}
::-webkit-scrollbar-track:vertical {
background: #000
}
::-webkit-scrollbar-track-piece {
background: #f6f6f6
}
::-webkit-scrollbar-thumb:vertical {
background: #d0d0d0;
}
::-webkit-scrollbar-thumb:vertical:hover {
background: #3B3B3B
}
::-webkit-scrollbar-corner:vertical {
background: #535353
}
::-webkit-scrollbar-resizer:vertical {
background: #FF6E00
}
input[type="text"]:focus, input[type="password"]:focus {
border: none;
outline: none;
}
.header, .mainBody, .footer {
width: 960px;
margin: 0 auto;
}
/*头部区域*/
.header {
height: 90px;
margin-bottom: 20px;
background: url(../images/logo.png) no-repeat 0 center;
border-bottom: 1px solid #d4d4d4;
}
/*主要区域*/
.mainBody {
overflow-x: hidden;
overflow-y: auto;
padding: 0 10px;
}
.mainBody .correct, .mainBody .error {
padding-left: 22px;
}
.mainBody .correct {
background: url(../images/correctBg.png) no-repeat 0 center;
color: green;
}
.mainBody .error {
background: url(../images/errorBg.png) no-repeat 0 center;
color: red;
}
.mainBody .text {
line-height: 25px;
}
.mainBody .text h3 {
font-size: 14px;
text-align: center;
margin-bottom: 10px;
color: #333;
}
.mainBody .text h4 {
font-size: 13px;
margin: 10px 0 5px 0;
color: #333;
}
.mainBody .forms .head {
font-weight: bold;
font-size: 14px;
}
.mainBody .forms .firstCol {
padding-left: 5px;
}
.mainBody .forms .endCol {
padding-right: 5px;
text-align: right;
}
.mainBody .table .title {
font-weight: bold;
font-size: 14px;
}
.mainBody .table .input, .readonly {
width: 280px;
height: 24px;
line-height: 24px;
margin: 1px;
border: 1px solid #ccc;
padding: 0 3px;
}
.mainBody .table .readonly {
display: inline-block;
border: none;
}
.mainBody .table .inputOn {
width: 280px;
height: 24px;
line-height: 24px;
padding: 2px 5px;
background: url(../images/inputOnBg.png) no-repeat 0 center;
border: 0;
}
.mainBody .table .cnote {
margin-left: 20px;
color: #999;
}
.mainBody .note {
width: 400px;
margin: 80px auto 0;
}
.mainBody .note .complete, .mainBody .note .already {
width: 400px;
padding: 90px 0 0 95px;
line-height: 22px;
}
.mainBody .note .complete {
background: url(../images/complete.png) no-repeat;
}
.mainBody .note .already {
background: url(../images/already.png) no-repeat;
}
.mainBody .note span {
color: #999;
padding: 0 5px;
}
.mainBody .note a {
text-decoration: underline;
}
.mainBody .note a:hover {
text-decoration: none;
}
.mainBody .note a.link {
text-decoration: none;
}
.mainBody .note a.link:hover {
text-decoration: underline;
}
/* 页脚区域 */
.footer {
margin-top: 20px;
height: 50px;
border-top: 3px solid #f0f0f0;
background: #fff;
position: relative;
}
.footer .step, .footer .step2, .footer .step3, .footer .step4, .footer .step5 {
display: block;
height: 3px;
position: absolute;
left: 0;
bottom: 50px;
background: #0cd7f7;
overflow: hidden;
z-index: 999;
}
.footer .step {
width: 25%;
}
.footer .step2 {
width: 50%;
}
.footer .step3 {
width: 75%;
}
.footer .step4 {
width: 100%;
}
.footer .step5 {
width: 100%;
}
.footer .copyright {
float: left;
padding-left: 10px;
line-height: 50px;
font-family: Verdana;
}
.footer .formSubBtn {
width: 200px;
float: right;
margin-top: 10px;
padding-right: 20px;
text-align: right;
}
.footer .formSubBtn .submit, .formSubBtn .back {
display: inline-block;
width: 78px;
height: 28px;
line-height: 28px;
text-align: center;
font-family: "微软雅黑";
font-size: 14px;
}
.footer .formSubBtn .submit {
background: #3d566d;
border: 1px solid #3d566d;
color: #fff;
}
.footer .formSubBtn .submit:hover {
background: #4f6880;
text-decoration: none;
}
.footer .formSubBtn .back {
margin-right: 10px;
background: #fff;
border: 1px solid #999;
color: #666;
}
.footer .formSubBtn .back:hover {
border: 1px solid #666;
text-decoration: none;
}