mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-08-06 10:57:26 +08:00
refactor: 更新 README 文档与后端服务配置
This commit is contained in:
24
README.en.md
24
README.en.md
@@ -67,14 +67,21 @@ One codebase supports:
|
|||||||
Built with:
|
Built with:
|
||||||
|
|
||||||
- Spring Boot
|
- Spring Boot
|
||||||
- Spring Cloud
|
- MySQL
|
||||||
- Redis
|
- Redis
|
||||||
- RocketMQ
|
|
||||||
- Elasticsearch
|
|
||||||
- Docker
|
- Docker
|
||||||
- ShardingSphere
|
|
||||||
|
|
||||||
Supports distributed deployment and high concurrency ecommerce scenarios.
|
Supports standalone deployment: **buyer-api** (8888), **manager-api** (8887, includes store APIs), **im-api** (8885). Product search uses MySQL. Async messaging uses Redis queues. Scheduled tasks use Spring `@Scheduled`.
|
||||||
|
|
||||||
|
### Frontend API paths
|
||||||
|
|
||||||
|
| App | Public API prefix |
|
||||||
|
| :--- | :--- |
|
||||||
|
| Buyer | `{buyerUrl}/buyer/common/*` |
|
||||||
|
| Seller | `{sellerUrl}/store/common/*` |
|
||||||
|
| Manager | `{managerUrl}/manager/common/*` |
|
||||||
|
|
||||||
|
The legacy `common-api` and `/common/common/*` paths are removed.
|
||||||
|
|
||||||
### Ecommerce Features
|
### Ecommerce Features
|
||||||
|
|
||||||
@@ -96,14 +103,11 @@ Supports distributed deployment and high concurrency ecommerce scenarios.
|
|||||||
|
|
||||||
### Backend
|
### Backend
|
||||||
|
|
||||||
- Java
|
- Java 21
|
||||||
- Spring Boot
|
- Spring Boot 4
|
||||||
- Spring Cloud
|
|
||||||
- MyBatis Plus
|
- MyBatis Plus
|
||||||
- MySQL
|
- MySQL
|
||||||
- Redis
|
- Redis
|
||||||
- RocketMQ
|
|
||||||
- Elasticsearch
|
|
||||||
- JWT
|
- JWT
|
||||||
- Docker
|
- Docker
|
||||||
|
|
||||||
|
|||||||
46
README.md
46
README.md
@@ -79,10 +79,30 @@ LILISHOP 是基于 Spring Boot / Spring Cloud / Vue / Uniapp 开发的 Java 开
|
|||||||
[**部署文档 -> 环境准备**](https://docs.pickmall.cn/deply/deply.html)
|
[**部署文档 -> 环境准备**](https://docs.pickmall.cn/deply/deply.html)
|
||||||
|
|
||||||
#### 数据库初始化
|
#### 数据库初始化
|
||||||
- **推荐方式**: 使用项目提供的 `docker-compose` 配置,可自动完成数据库(MySQL, Redis, Elasticsearch等)的部署与初始化。
|
- **推荐方式**: 使用 [`docker`](https://gitee.com/beijing_hongye_huicheng/docker) 仓库中的 `docker-compose`,可自动完成 **MySQL、Redis** 等中间件的部署与初始化。
|
||||||
- **手动方式**: 如果您选择手动部署,SQL脚本位于以下地址。请确保获取与您代码版本一致的SQL文件。
|
- **手动方式**: 如果您选择手动部署,SQL脚本位于以下地址。请确保获取与您代码版本一致的SQL文件。
|
||||||
[**数据库脚本 (Gitee)**](https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql)
|
[**数据库脚本 (Gitee)**](https://gitee.com/beijing_hongye_huicheng/docker/tree/master/init/mysql)
|
||||||
|
|
||||||
|
#### 后端服务与端口(`vue3` 分支)
|
||||||
|
|
||||||
|
| 服务 | 端口 | 说明 |
|
||||||
|
| :--- | :--- | :--- |
|
||||||
|
| buyer-api | 8888 | 买家端 API |
|
||||||
|
| manager-api | 8887 | 平台 + 商家 API(`/manager/**`、`/store/**`) |
|
||||||
|
| im-api | 8885 | 客服 IM / WebSocket |
|
||||||
|
|
||||||
|
运行依赖:**MySQL + Redis**。商品搜索使用 MySQL;异步消息使用 Redis 队列;定时任务使用 Spring `@Scheduled`(内嵌在 manager-api)。
|
||||||
|
|
||||||
|
#### 前端 API 路径约定
|
||||||
|
|
||||||
|
| 端 | 公共接口前缀 |
|
||||||
|
| :--- | :--- |
|
||||||
|
| 买家 PC/H5 | `{buyerUrl}/buyer/common/*` |
|
||||||
|
| 商家端 | `{sellerUrl}/store/common/*` |
|
||||||
|
| 平台端 | `{managerUrl}/manager/common/*` |
|
||||||
|
|
||||||
|
`common-api` 已下线,请勿再使用 `/common/common/*` 旧路径。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 5. 技术架构
|
### 5. 技术架构
|
||||||
@@ -90,20 +110,18 @@ LILISHOP 是基于 Spring Boot / Spring Cloud / Vue / Uniapp 开发的 Java 开
|
|||||||
#### 5.1 架构图
|
#### 5.1 架构图
|
||||||

|

|
||||||
|
|
||||||
#### 5.2 后端技术栈
|
#### 5.2 后端技术栈(当前分支)
|
||||||
|
|
||||||
| 技术 | 选型 | 版本 | 备注/用途 |
|
| 技术 | 选型 | 备注/用途 |
|
||||||
| :-------------- | :-------------- | :----- | :--------- |
|
| :--- | :--- | :--- |
|
||||||
| 核心框架 | Spring Boot | 3.5.6 | 简化应用开发 |
|
| 核心框架 | Spring Boot 4 | 简化应用开发 |
|
||||||
| ORM框架 | MyBatis-Plus | 3.5.8 | 数据持久化 |
|
| ORM 框架 | MyBatis-Plus | 数据持久化 |
|
||||||
| 数据库 | MySQL (LTS) | 8.3.0 | 关系型数据存储 |
|
| 数据库 | MySQL | 关系型数据存储 |
|
||||||
| 消息队列 | RocketMQ | 2.3.4 | 异步任务与解耦 |
|
| 缓存 | Redis | 数据缓存、消息队列 |
|
||||||
| 缓存 | Redis | - | 数据缓存 |
|
| 商品搜索 | MySQL | 已移除 Elasticsearch |
|
||||||
| 搜索引擎 | Elasticsearch | - | 商品搜索 |
|
| 异步消息 | Redis List 队列 | 已移除 RocketMQ 中间件 |
|
||||||
| 安全框架 | Spring Security | - | 认证与授权 |
|
| 定时任务 | Spring `@Scheduled` | 已移除 XXL-Job |
|
||||||
| 分库分表 | ShardingSphere | 4.0.0 | 数据水平扩展 |
|
| 安全框架 | Spring Security + JWT | 认证与授权 |
|
||||||
| 定时任务 | XXL-Job | 2.3.0 | 分布式任务调度 |
|
|
||||||
| 认证方案 | JWT | - | Token 方案 |
|
|
||||||
|
|
||||||
#### 5.3 前端技术栈
|
#### 5.3 前端技术栈
|
||||||
|
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export const ServeSendTalkFile = (data) => {
|
|||||||
|
|
||||||
// 发送聊天图片服务接口
|
// 发送聊天图片服务接口
|
||||||
export const ServeSendTalkImage = (data) => {
|
export const ServeSendTalkImage = (data) => {
|
||||||
return upload("/common/common/upload/file", data);
|
return upload("/buyer/common/upload/file", data);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 发送表情包服务接口
|
// 发送表情包服务接口
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { setSetting, createIndex, getProgress, deleteGoodsDown, generateGoodsCache, delSkuIndex } from "@/api/index";
|
import { setSetting } from "@/api/index";
|
||||||
export default {
|
export default {
|
||||||
props: ["res", "type"],
|
props: ["res", "type"],
|
||||||
data() {
|
data() {
|
||||||
@@ -91,69 +91,6 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
createIndex() {
|
|
||||||
createIndex().then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
ElMessage.success("开始生成!");
|
|
||||||
this.showProgress = true;
|
|
||||||
setTimeout(() => {
|
|
||||||
this.intervalProgress = setInterval(() => {
|
|
||||||
getProgress().then((resp) => {
|
|
||||||
const progressResult = resp.result;
|
|
||||||
if (progressResult != null && progressResult.flag === 0) {
|
|
||||||
clearInterval(this.intervalProgress);
|
|
||||||
this.showProgress = false;
|
|
||||||
ElMessage.success("生成成功!");
|
|
||||||
} else {
|
|
||||||
this.progressVal = Math.floor((progressResult.processed / progressResult.total) * 100);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 1000);
|
|
||||||
}, 10000);
|
|
||||||
} else if (res.code === 100000) {
|
|
||||||
this.showProgress = true;
|
|
||||||
this.intervalProgress = setInterval(() => {
|
|
||||||
getProgress().then((resp) => {
|
|
||||||
const progressResult = resp.result;
|
|
||||||
if (progressResult != null && progressResult.flag === 0) {
|
|
||||||
clearInterval(this.intervalProgress);
|
|
||||||
this.showProgress = false;
|
|
||||||
ElMessage.success("生成成功!");
|
|
||||||
} else {
|
|
||||||
this.progressVal = Math.floor((progressResult.processed / progressResult.total) * 100);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
deleteDownGoods() {
|
|
||||||
deleteGoodsDown().then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
ElMessage.success("删除成功!");
|
|
||||||
} else {
|
|
||||||
ElMessage.error("删除失败!");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
generateCache() {
|
|
||||||
generateGoodsCache().then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
ElMessage.success("生成成功!");
|
|
||||||
} else {
|
|
||||||
ElMessage.error("生成失败!");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
deleteNotExistIndex() {
|
|
||||||
delSkuIndex().then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
ElMessage.success("删除成功!");
|
|
||||||
} else {
|
|
||||||
ElMessage.error("删除失败!");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
setupSetting() {
|
setupSetting() {
|
||||||
setSetting(this.type, this.formValidate).then((res) => {
|
setSetting(this.type, this.formValidate).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -205,19 +142,6 @@ export default {
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
margin-left: 150px;
|
margin-left: 150px;
|
||||||
}
|
}
|
||||||
.goods-setting-action-row {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
.goods-setting-action-row .progress-item {
|
|
||||||
flex: 0 0 240px;
|
|
||||||
min-width: 200px;
|
|
||||||
}
|
|
||||||
.goods-setting-action-row .progress-item :deep(.el-progress) {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
:deep(.el-input){
|
:deep(.el-input){
|
||||||
width: 180px !important;
|
width: 180px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,7 +151,7 @@
|
|||||||
<el-upload
|
<el-upload
|
||||||
v-if="canUploadImages"
|
v-if="canUploadImages"
|
||||||
ref="up"
|
ref="up"
|
||||||
:action="commonUrl + '/common/common/upload/file'"
|
:action="sellerUrl + '/store/common/upload/file'"
|
||||||
:data="uploadData"
|
:data="uploadData"
|
||||||
:headers="accessToken"
|
:headers="accessToken"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
@@ -323,7 +323,7 @@ import {
|
|||||||
updateFileDirectory,
|
updateFileDirectory,
|
||||||
} from "@/api/index";
|
} from "@/api/index";
|
||||||
import DPlayer from "dplayer";
|
import DPlayer from "dplayer";
|
||||||
import {commonUrl} from "@/libs/axios";
|
import {sellerUrl} from "@/libs/axios";
|
||||||
|
|
||||||
import config from "@/config/index";
|
import config from "@/config/index";
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
commonUrl, // 上传文件路径
|
sellerUrl, // 上传文件路径
|
||||||
config, // api地址
|
config, // api地址
|
||||||
fileDirectoryId: "",
|
fileDirectoryId: "",
|
||||||
groupFormValidate: {
|
groupFormValidate: {
|
||||||
|
|||||||
Reference in New Issue
Block a user