一、产品概述
1.版本信息
- 版本号:V1.0
- 创建日期:2021年10月12日14:05:19
- 审核人:邹利平
2.修订历史
| 时间 | 版本号 | 修订人 | 主要修订内容 |
|---|---|---|---|
| 2021年10月12日14:05:42 | V1.0 | 邹利平 | 新建 |
二、文档说明
1、名词解释
| 术语 / 缩略词 | 说明 |
|---|---|
| SPU | |
| SKU | SPU(Standard Product Unit) 是指标准产品单位 |
四、需求背景
1.产品 / 数据现状
2.用户调研
简要说明调研方法、样本情况及关键结论,点击工具栏
「插入链接」,在此附上详细的数据分析报告并添加在【附录】中
五、表结构设计
本文主要对商品分类、品牌管理、商品类型这三个功能的表进行解析,采用功能与表结构对照的形式。表解析只会标注一些需要理解的字段,简单字段请自行对照表注释。
商品分类
商品分类表
CREATE TABLE `pms_product_category` (`id` bigint(20) NOT NULL AUTO_INCREMENT,`parent_id` bigint(20) DEFAULT NULL COMMENT '上机分类的编号:0表示一级分类',`name` varchar(64) DEFAULT NULL,`level` int(1) DEFAULT NULL COMMENT '分类级别:0->1级;1->2级',`product_count` int(11) DEFAULT NULL,`product_unit` varchar(64) DEFAULT NULL,`nav_status` int(1) DEFAULT NULL COMMENT '是否显示在导航栏:0->不显示;1->显示',`show_status` int(1) DEFAULT NULL COMMENT '显示状态:0->不显示;1->显示',`sort` int(11) DEFAULT NULL,`icon` varchar(255) DEFAULT NULL COMMENT '图标',`keywords` varchar(255) DEFAULT NULL,`description` text COMMENT '描述',PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8 COMMENT='产品分类';
管理端展现
商品分类列表
添加商品分类

1. 初始化级联下拉列表数据
2. 保存相应数据
3. 编辑状态—初始化以保存筛选属性
移动端展现

品牌管理
商品品牌表
CREATE TABLE `pms_brand` (`id` bigint(20) NOT NULL AUTO_INCREMENT,`name` varchar(64) DEFAULT NULL,`first_letter` varchar(8) DEFAULT NULL COMMENT '首字母',`sort` int(11) DEFAULT NULL,`factory_status` int(1) DEFAULT NULL COMMENT '是否为品牌制造商:0->不是;1->是',`show_status` int(1) DEFAULT NULL,`product_count` int(11) DEFAULT NULL COMMENT '产品数量',`product_comment_count` int(11) DEFAULT NULL COMMENT '产品评论数量',`logo` varchar(255) DEFAULT NULL COMMENT '品牌logo',`big_pic` varchar(255) DEFAULT NULL COMMENT '专区大图',`brand_story` text COMMENT '品牌故事',PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COMMENT='品牌表';
管理端展现
相关表结构
商品属性分类表
CREATE TABLE `pms_product_attribute_category` (`id` bigint(20) NOT NULL AUTO_INCREMENT,`name` varchar(64) DEFAULT NULL,`attribute_count` int(11) DEFAULT '0' COMMENT '属性数量',`param_count` int(11) DEFAULT '0' COMMENT '参数数量',PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='产品属性分类表';
商品属性表
type 字段用于控制其是规格还是参数
CREATE TABLE `pms_product_attribute` (`id` bigint(20) NOT NULL AUTO_INCREMENT,`product_attribute_category_id` bigint(20) DEFAULT NULL,`name` varchar(64) DEFAULT NULL,`select_type` int(1) DEFAULT NULL COMMENT '属性选择类型:0->唯一;1->单选;2->多选',`input_type` int(1) DEFAULT NULL COMMENT '属性录入方式:0->手工录入;1->从列表中选取',`input_list` varchar(255) DEFAULT NULL COMMENT '可选值列表,以逗号隔开',`sort` int(11) DEFAULT NULL COMMENT '排序字段:最高的可以单独上传图片',`filter_type` int(1) DEFAULT NULL COMMENT '分类筛选样式:1->普通;1->颜色',`search_type` int(1) DEFAULT NULL COMMENT '检索类型;0->不需要进行检索;1->关键字检索;2->范围检索',`related_status` int(1) DEFAULT NULL COMMENT '相同属性产品是否关联;0->不关联;1->关联',`hand_add_status` int(1) DEFAULT NULL COMMENT '是否支持手动新增;0->不支持;1->支持',`type` int(1) DEFAULT NULL COMMENT '属性的类型;0->规格;1->参数',PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COMMENT='商品属性参数表';
商品属性值表
如果对应的参数是规格且规格支持手动添加,那么该表用于存储手动新增的值;如果对应的商品属性是参数,那么该表用于存储参数的值。
CREATE TABLE `pms_product_attribute_value` (`id` bigint(20) NOT NULL AUTO_INCREMENT,`product_id` bigint(20) DEFAULT NULL,`product_attribute_id` bigint(20) DEFAULT NULL,`value` varchar(64) DEFAULT NULL COMMENT '手动添加规格或参数的值,参数单值,规格有多个时以逗号隔开',PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=228 DEFAULT CHARSET=utf8 COMMENT='存储产品参数信息的表';
商品分类和属性的关系表
用于选中分类后搜索时生成筛选属性。
create table pms_product_category_attribute_relation (id bigint not null auto_increment,product_category_id bigint comment '商品分类id',product_attribute_id bigint comment '商品属性id',primary key (id));
管理端展现
- 商品属性分类列表

- 添加商品属性分类

- 商品规格列表

- 商品参数列表

- 添加商品属性

- 添加商品时,选中商品属性分类,就会显示该分类的属性,用于生成sku

-
移动端展现
选择商品规格

- 查看商品参数

- 搜索商品时用于选择分类后的筛选
编辑商品
相关表结构
商品表
商品信息主要包括四部分:商品的基本信息、商品的促销信息、商品的属性信息、商品的关联,商品表是整个商品的基本信息部分。
create table pms_product(id bigint not null auto_increment,brand_id bigint comment '品牌id',product_category_id bigint comment '品牌分类id',feight_template_id bigint comment '运费模版id',product_attribute_category_id bigint comment '品牌属性分类id',name varchar(64) not null comment '商品名称',pic varchar(255) comment '图片',product_sn varchar(64) not null comment '货号',delete_status int(1) comment '删除状态:0->未删除;1->已删除',publish_status int(1) comment '上架状态:0->下架;1->上架',new_status int(1) comment '新品状态:0->不是新品;1->新品',recommand_status int(1) comment '推荐状态;0->不推荐;1->推荐',verify_status int(1) comment '审核状态:0->未审核;1->审核通过',sort int comment '排序',sale int comment '销量',price decimal(10,2) comment '价格',promotion_price decimal(10,2) comment '促销价格',gift_growth int default 0 comment '赠送的成长值',gift_point int default 0 comment '赠送的积分',use_point_limit int comment '限制使用的积分数',sub_title varchar(255) comment '副标题',description text comment '商品描述',original_price decimal(10,2) comment '市场价',stock int comment '库存',low_stock int comment '库存预警值',unit varchar(16) comment '单位',weight decimal(10,2) comment '商品重量,默认为克',preview_status int(1) comment '是否为预告商品:0->不是;1->是',service_ids varchar(64) comment '以逗号分割的产品服务:1->无忧退货;2->快速退款;3->免费包邮',keywords varchar(255) comment '关键字',note varchar(255) comment '备注',album_pics varchar(255) comment '画册图片,连产品图片限制为5张,以逗号分割',detail_title varchar(255) comment '详情标题',detail_desc text comment '详情描述',detail_html text comment '产品详情网页内容',detail_mobile_html text comment '移动端网页详情',promotion_start_time datetime comment '促销开始时间',promotion_end_time datetime comment '促销结束时间',promotion_per_limit int comment '活动限购数量',promotion_type int(1) comment '促销类型:0->没有促销使用原价;1->使用促销价;2->使用会员价;3->使用阶梯价格;4->使用满减价格;5->限时购',product_category_name varchar(255) comment '产品分类名称',brand_name varchar(255) comment '品牌名称',primary key (id));
商品SKU表
SKU(Stock Keeping Unit)是指库存量单位,SPU(Standard Product Unit)是指标准产品单位。举个例子:iphone xs是一个SPU,而iphone xs 公开版 64G 银色是一个SKU。
create table pms_sku_stock(id bigint not null auto_increment,product_id bigint comment '商品id',sku_code varchar(64) not null comment 'sku编码',price decimal(10,2) comment '价格',stock int default 0 comment '库存',low_stock int comment '预警库存',sp_data varchar(1000) comment '商品销售属性,json格式',pic varchar(255) comment '展示图片',sale int comment '销量',promotion_price decimal(10,2) comment '单品促销价格',lock_stock int default 0 comment '锁定库存',primary key (id));
商品阶梯价格表
商品优惠相关表,购买同商品满足一定数量后,可以使用打折价格进行购买。如:买两件商品可以打八折。
create table pms_product_ladder(id bigint not null auto_increment,product_id bigint comment '商品id',count int comment '满足的商品数量',discount decimal(10,2) comment '折扣',price decimal(10,2) comment '折后价格',primary key (id));
商品满减表
商品优惠相关表,购买同商品满足一定金额后,可以减免一定金额。如:买满1000减100元。
create table pms_product_full_reduction(id bigint not null auto_increment,product_id bigint comment '商品id',full_price decimal(10,2) comment '商品满足金额',reduce_price decimal(10,2) comment '商品减少金额',primary key (id));
商品会员价格表
根据不同会员等级,可以以不同的会员价格购买。此处设计有缺陷,可以做成不同会员等级可以减免多少元或者按多少折扣进行购买。
create table pms_member_price(id bigint not null auto_increment,product_id bigint comment '商品id',member_level_id bigint comment '会员等级id',member_price decimal(10,2) comment '会员价格',member_level_name varchar(100) comment '会员等级名称',primary key (id));
管理端展现
填写商品信息
填写商品促销
特惠促销
会员价格
阶梯价格
满减价格
填写商品属性
选择商品关联
移动端展现
商品介绍
图文详情
相关专题
商品评价及回复
相关表结构
商品评价表
create table pms_comment(id bigint not null auto_increment,product_id bigint comment '商品id',member_nick_name varchar(255) comment '会员昵称',product_name varchar(255) comment '商品名称',star int(3) comment '评价星数:0->5',member_ip varchar(64) comment '评价的ip',create_time datetime comment '创建时间',show_status int(1) comment '是否显示',product_attribute varchar(255) comment '购买时的商品属性',collect_couont int comment '收藏数',read_count int comment '阅读数',content text comment '内容',pics varchar(1000) comment '上传图片地址,以逗号隔开',member_icon varchar(255) comment '评论用户头像',replay_count int comment '回复数',primary key (id));
产品评价回复表
create table pms_comment_replay(id bigint not null auto_increment,comment_id bigint comment '评论id',member_nick_name varchar(255) comment '会员昵称',member_icon varchar(255) comment '会员头像',content varchar(1000) comment '内容',create_time datetime comment '创建时间',type int(1) comment '评论人员类型;0->会员;1->管理员',primary key (id));
移动端展现
商品评价列表
商品评价详情
商品回复列表
商品审核及操作记录
相关表结构
商品审核记录表
用于记录商品审核记录
create table pms_product_vertify_record(id bigint not null auto_increment,product_id bigint comment '商品id',create_time datetime comment '创建时间',vertify_man varchar(64) comment '审核人',status int(1) comment '审核后的状态:0->未通过;2->已通过',detail varchar(255) comment '反馈详情',primary key (id));
商品操作记录表
用于记录商品操作记录
create table pms_product_operate_log(id bigint not null auto_increment,product_id bigint comment '商品id',price_old decimal(10,2) comment '改变前价格',price_new decimal(10,2) comment '改变后价格',sale_price_old decimal(10,2) comment '改变前优惠价',sale_price_new decimal(10,2) comment '改变后优惠价',gift_point_old int comment '改变前积分',gift_point_new int comment '改变后积分',use_point_limit_old int comment '改变前积分使用限制',use_point_limit_new int comment '改变后积分使用限制',operate_man varchar(64) comment '操作人',create_time datetime comment '创建时间',primary key (id));
六、功能详细说明
1.产品流程图
鼠标点击左上角
,点击画板选择流程图,即可进入流程图创作你的产品流程图
2.交互原型图
鼠标点击左上角
,点击“引入第三方服务”中的“Figma 设计图”,粘贴Figma链接, 在文档中嵌入网页书签,展示设计原型
3.功能说明
| 序号 | 模块 | 功能 | 功能详细说明 | 交互图 |
|---|---|---|---|---|
| 1 | 资料编辑 | - 更换头像 |
||
| . | ||||
七、非功能需求
可以列举性能需求、系统需求、运营需求、安全需求、财务需求、法务需求、统计需求、使用帮助等…
「插入链接」,在此附上详细的数据分析报告并添加在【附录】中 
,点击画板选择流程图,即可进入流程图创作你的产品流程图
,点击“引入第三方服务”中的“Figma 设计图”,粘贴Figma链接,
在文档中嵌入网页书签,展示设计原型 