更新文档

This commit is contained in:
启航 2024-03-14 16:04:48 +08:45
parent 46fecba068
commit cd9f321b6a
10 changed files with 369 additions and 43 deletions

View File

@ -0,0 +1,228 @@
# 启航电商OMS系统架构设计说明书
  
| 时间 | 版本 | 编写人 |备注 |
| --- | --- | --- | --- |
| 2024-3-15 | 0.1 | 齐李平 | |
<div style=”page-break-after: always;></div>
&nbsp;&nbsp;
&nbsp;
## 一、引言
### 1.1 背景
本文档旨在介绍启航电商OMS系统的架构设计为项目开发及维护提供指导。
&nbsp;
### 1.2 术语和缩略语
| 缩写 | 术语 |备注 |
| --- | --- | --- |
| OMS | 订单处理系统 | |
| 平台 | 指天猫、京东、抖店、拼多多 | |
&nbsp;
### 1.3 参考资料
暂无
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
## 二、功能设计
### 2.1 软件名称
`启航电商OMS系统`
### 2.2 软件功能
#### 2.2.1 订单管理
+ 订单搜索、查看
+ 平台订单拉取
+ 平台订单更新
+ 自动更新任务
+ 订单备注
+ 订单商品管理ERP商品
+ 订单发货
#### 2.2.2 售后管理
+ 售后搜索、查看
+ 售后单拉取
+ 售后单更新
+ 自动更新任务
#### 2.2.3 ERP商品管理
+ ERP商品查询id、编码、标题、库存
+ 添加ERP商品Skuid、编码
+ 批量导入
#### 2.2.4 店铺管理
+ 店铺查询
+ 店铺参数设置
+ 店铺商品管理
+ 店铺商品搜索
+ 店铺商品管理ERP商品
+ 店铺商品拉取、更新
+ 店铺其他参数
+ 快递公司库(分平台)
+ 快递地址库(分平台)
### 2.3 软件应用
该软件适用于电商平台订单管理、售后管理,包括:订单同步、订单发货、售后同步、商品同步等。
### 2.4 需求边界
该软件不包含:订单打印、仓库进销存相关功能;
## 三、架构设计
### 3.1 架构设计目标和约束
#### 3.1.1 运行环境
| 序号 | 项目 | 详细 |
| --- | --- | --- |
| 1 | 后台接口环境 | Linux、Jdk17、MySQL8、Redis、Nacos2.2.0 |
| 2 | 前端环境 | Nginx |
#### 3.1.2 开发环境
| 序号 | 项目 | 详细 |
| --- | --- | --- |
| 1 | 操作系统 | Windows 10 |
| 2 | 编译系统 | Jdk17、nodejs20 |
| 3 | 编程语言 | Java、ts |
| 4 | 编程工具 | idea、vscode |
| 5 | 软件环境 | MySQL8、Redis、Nacos2.2.0 |
#### 3.1.3 开发框架及组件
| 序号 | 项目 | 框架 | 版本 |
| --- | --- | --- | --- |
| 1 | 容器 | SpringBoot | 3.0.2 |
| 2 | 微服务架构 | SpringCloudAlibaba | 2022.0.0.0 |
| 3 | 注册组件 | Nacos | 2.2.0 |
| 3 | 缓存 | Redis | 7.x |
| 4 | 数据库 | MySQL | 8.x |
| 5 | 前端框架 | Vue | 3.x |
| 6 | 前端框架 | Element-Plus | 最新版 |
### 3.2 总体架构
![项目架构图](项目架构图.png)
### 3.3 核心流程
#### 3.3.1 订单拉取流程
```mermaid
sequenceDiagram
participant 开放平台
participant 拉取订单模块
participant 消息队列
participant 订单处理模块
开放平台 -> 拉取订单模块: 拉取订单请求
activate 拉取订单模块
拉取订单模块 -> 开放平台: 订单数据
开放平台 -> 消息队列: 发送订单通知
activate 消息队列
消息队列 -> 订单处理模块: 订单数据
activate 订单处理模块
订单处理模块 --> 消息队列: 处理结果
```
#### 3.3.2 订单发货推送
```mermaid
graph LR
A(同步ERP系统快递单号) --> B(更新订单)
B --> C(同步到平台)
C --> D(完成)
```
#### 3.3.3 售后拉取
```mermaid
sequenceDiagram
participant 开放平台
participant 拉取售后模块
participant 消息队列
participant 售后处理模块
开放平台 -> 拉取售后模块: 拉取售后请求
activate 拉取售后模块
拉取售后模块 -> 开放平台:售后数据
开放平台 -> 消息队列: 发送售后通知
activate 消息队列
消息队列 -> 售后处理模块: 售后数据
activate 售后处理模块
售后处理模块 --> 消息队列: 处理结果
```
#### 3.3.4 商品拉取
```mermaid
sequenceDiagram
拉取动作->>平台 : 发送请求
平台-->>数据库 : 更新数据库
```
### 3.4 项目结构
![项目结构图](项目结构图.png)
## 四、数据库设计
后续补充
## 五、部署
### 5.1 总体结构
![软件部署图](软件部署图.png)

Binary file not shown.

View File

@ -0,0 +1,55 @@
<mxfile host="app.diagrams.net" modified="2024-03-14T06:47:04.992Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" etag="w9lxi9F2Bc3V_Sb40O4y" version="24.0.6" type="device">
<diagram name="第 1 页" id="Lhk7iqGXQ-fLZAvV0IkU">
<mxGraphModel dx="1434" dy="746" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="GjbjDTf6JkTWPSmCzYIe-1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="90" y="40" width="460" height="80" as="geometry" />
</mxCell>
<mxCell id="GjbjDTf6JkTWPSmCzYIe-4" value="前端展示层" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1">
<mxGeometry x="90" y="40" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="GjbjDTf6JkTWPSmCzYIe-5" value="api网关" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="230" y="50" width="140" height="60" as="geometry" />
</mxCell>
<mxCell id="GjbjDTf6JkTWPSmCzYIe-6" value="Nginx" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="390" y="50" width="140" height="60" as="geometry" />
</mxCell>
<mxCell id="GjbjDTf6JkTWPSmCzYIe-7" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="90" y="131" width="460" height="80" as="geometry" />
</mxCell>
<mxCell id="GjbjDTf6JkTWPSmCzYIe-8" value="注册中心、服务中心" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="90" y="131" width="120" height="80" as="geometry" />
</mxCell>
<mxCell id="GjbjDTf6JkTWPSmCzYIe-9" value="Nacos" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="230" y="141" width="300" height="60" as="geometry" />
</mxCell>
<mxCell id="bSwcw1P2C5m8dZfzIWhJ-1" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="90" y="222" width="460" height="228" as="geometry" />
</mxCell>
<mxCell id="bSwcw1P2C5m8dZfzIWhJ-2" value="微服务层" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="1">
<mxGeometry x="90" y="222" width="120" height="228" as="geometry" />
</mxCell>
<mxCell id="bSwcw1P2C5m8dZfzIWhJ-3" value="sys-api" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="230" y="232" width="140" height="60" as="geometry" />
</mxCell>
<mxCell id="bSwcw1P2C5m8dZfzIWhJ-4" value="oms-api" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="390" y="232" width="140" height="60" as="geometry" />
</mxCell>
<mxCell id="bSwcw1P2C5m8dZfzIWhJ-5" value="tao-api" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="230" y="304" width="140" height="60" as="geometry" />
</mxCell>
<mxCell id="bSwcw1P2C5m8dZfzIWhJ-6" value="jd-api" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="390" y="304" width="140" height="60" as="geometry" />
</mxCell>
<mxCell id="bSwcw1P2C5m8dZfzIWhJ-7" value="dou-api" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="230" y="378" width="140" height="60" as="geometry" />
</mxCell>
<mxCell id="bSwcw1P2C5m8dZfzIWhJ-8" value="pdd-api" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="390" y="378" width="140" height="60" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

BIN
doc/doc/软件部署图.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -0,0 +1,46 @@
<mxfile host="app.diagrams.net" modified="2024-03-14T05:02:38.155Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" etag="cnAddnSDV3x1ONefjNU9" version="23.1.7" type="device">
<diagram name="第 1 页" id="VFYfww_sdWvGYr7hJFIg">
<mxGraphModel dx="1434" dy="746" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="7KIA_immedqvToHCkOJM-1" value="浏览器" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="100" y="70" width="440" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-2" value="api网关" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" parent="1" vertex="1">
<mxGeometry x="100" y="140" width="440" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-3" value="sys-api" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="1" vertex="1">
<mxGeometry x="100" y="290" width="70" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-4" value="tao-api" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" parent="1" vertex="1">
<mxGeometry x="248" y="290" width="70" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-5" value="jd-api" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="322" y="290" width="70" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-6" value="dou-api" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" vertex="1">
<mxGeometry x="396" y="290" width="70" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-7" value="pdd-api" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="1" vertex="1">
<mxGeometry x="470" y="290" width="70" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-8" value="Redis" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" vertex="1">
<mxGeometry x="100" y="440" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-9" value="MySQL" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" parent="1" vertex="1">
<mxGeometry x="240" y="440" width="300" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-10" value="Nacos服务注册中心" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;fontColor=#333333;strokeColor=#666666;" parent="1" vertex="1">
<mxGeometry x="100" y="213" width="440" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-11" value="Nacos配置中心" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" parent="1" vertex="1">
<mxGeometry x="100" y="362" width="440" height="60" as="geometry" />
</mxCell>
<mxCell id="GByPQJbVOT-AE4jtbLCa-1" value="oms-api" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="174" y="290" width="70" height="60" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

BIN
doc/doc/项目架构图.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,40 @@
<mxfile host="app.diagrams.net" modified="2024-03-14T06:31:39.056Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36" etag="B-hKizldE7wMGYBI8PJr" version="24.0.6" type="device">
<diagram name="Page-1" id="c7488fd3-1785-93aa-aadb-54a6760d102a">
<mxGraphModel dx="1434" dy="746" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1100" pageHeight="850" background="none" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="Y18K0-ZkQQWjHe0wcU7F-3" value="api&lt;div&gt;SpringGateway网关api统一入口&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#d80073;fontColor=#ffffff;strokeColor=#A50040;" vertex="1" parent="1">
<mxGeometry x="110" y="10" width="460" height="60" as="geometry" />
</mxCell>
<mxCell id="Y18K0-ZkQQWjHe0wcU7F-4" value="" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" vertex="1" parent="1">
<mxGeometry x="110" y="230" width="460" height="80" as="geometry" />
</mxCell>
<mxCell id="Y18K0-ZkQQWjHe0wcU7F-5" value="sys-api&lt;div&gt;基础api&lt;/div&gt;&lt;div&gt;(用户、菜单)&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
<mxGeometry x="110" y="151" width="170" height="60" as="geometry" />
</mxCell>
<mxCell id="Y18K0-ZkQQWjHe0wcU7F-6" value="oms-api&lt;div&gt;主api&lt;/div&gt;&lt;div&gt;订单、售后、商品、店铺、消息处理模块&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="300" y="151" width="270" height="60" as="geometry" />
</mxCell>
<mxCell id="Y18K0-ZkQQWjHe0wcU7F-7" value="common&lt;div&gt;公共类库&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="110" y="80" width="220" height="60" as="geometry" />
</mxCell>
<mxCell id="Y18K0-ZkQQWjHe0wcU7F-8" value="security&lt;div&gt;token权限处理库&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="350" y="80" width="220" height="60" as="geometry" />
</mxCell>
<mxCell id="Y18K0-ZkQQWjHe0wcU7F-9" value="tao-api&lt;div&gt;天猫平台api&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="125" y="240" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="Y18K0-ZkQQWjHe0wcU7F-10" value="jd-api&lt;div&gt;京东平台api&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="235" y="240" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="Y18K0-ZkQQWjHe0wcU7F-11" value="dou-api&lt;div&gt;抖店平台api&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="345" y="240" width="100" height="60" as="geometry" />
</mxCell>
<mxCell id="Y18K0-ZkQQWjHe0wcU7F-13" value="pdd-api&lt;div&gt;拼多多平台api&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="455" y="240" width="100" height="60" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

BIN
doc/doc/项目结构图.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -1,43 +0,0 @@
<mxfile host="app.diagrams.net" modified="2024-02-27T03:04:14.632Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36" etag="xjO1iuWJkUFKg4xi2VTH" version="23.1.7" type="device">
<diagram name="第 1 页" id="VFYfww_sdWvGYr7hJFIg">
<mxGraphModel dx="1434" dy="746" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="7KIA_immedqvToHCkOJM-1" value="浏览器" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="100" y="70" width="440" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-2" value="api网关" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="100" y="140" width="440" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-3" value="sys-api" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="100" y="290" width="80" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-4" value="tao-api" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="190" y="290" width="80" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-5" value="jd-api" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="280" y="290" width="80" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-6" value="doudian-api" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="370" y="290" width="80" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-7" value="pdd-api" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="460" y="290" width="80" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-8" value="Redis" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="100" y="450" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-9" value="MySQL" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="240" y="450" width="300" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-10" value="Nacos服务注册中心" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="100" y="213" width="440" height="60" as="geometry" />
</mxCell>
<mxCell id="7KIA_immedqvToHCkOJM-11" value="Nacos配置中心" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="100" y="362" width="440" height="60" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB