diff --git a/README.md b/README.md index 29b31b3..6f0b2f1 100644 --- a/README.md +++ b/README.md @@ -1,351 +1,954 @@ -# 🌱 农产品直销平台 (SunnyFarm) +# 🌱 SunnyFarm | 农产品直销平台 -一个基于 Spring Boot + Vue.js + MySQL 的现代化农产品电商平台,支持多角色管理(用户、商家、管理员),提供完整的电商功能包括商品管理、订单处理、支付集成、库存管理等。 +*现代化农产品电商解决方案 - 连接农户与消费者的桥梁* -## 📋 目录 +[![Spring Boot](https://img.shields.io/badge/Spring%20Boot-2.7.14-brightgreen.svg)](https://spring.io/projects/spring-boot) +[![Vue.js](https://img.shields.io/badge/Vue.js-3.0-4FC08D.svg)](https://vuejs.org/) +[![MySQL](https://img.shields.io/badge/MySQL-8.0-blue.svg)](https://www.mysql.com/) +[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![Build Status](https://img.shields.io/badge/Build-Passing-success.svg)]() -- [功能特性](#功能特性) -- [技术栈](#技术栈) -- [环境要求](#环境要求) -- [快速开始](#快速开始) -- [配置说明](#配置说明) -- [部署指南](#部署指南) -- [API文档](#api文档) -- [贡献指南](#贡献指南) +[🚀 快速开始](#-快速开始) • [📖 文档](#-api文档) • [🎯 演示](#-默认账号) • [🤝 贡献](#-贡献指南) -## ✨ 功能特性 +--- -### 🛒 核心电商功能 -- **商品管理**: 分类管理、商品发布、图片上传、库存管理 -- **购物车**: 添加商品、数量调整、批量操作 -- **订单系统**: 创建订单、支付集成、状态跟踪、物流管理 -- **用户系统**: 注册登录、个人中心、收货地址管理 -- **评价系统**: 商品评价、商家回复、评分统计 + -### 👥 多角色支持 -- **普通用户**: 浏览商品、下单购买、管理订单 -- **商家**: 商品管理、订单处理、销售统计、客服聊天 -- **平台管理员**: 用户管理、商家审核、系统配置、数据统计 +## 📖 项目介绍 -### 🔧 技术亮点 -- **支付集成**: 支付宝沙箱支付,支持异步回调 -- **文件存储**: 腾讯云COS + CDN加速 -- **缓存优化**: Redis缓存用户会话和购物车数据 -- **邮件服务**: 注册验证码、订单通知 -- **实时聊天**: 用户与商家在线客服 -- **响应式设计**: 支持PC端和移动端访问 +**SunnyFarm** 是一个基于现代技术栈开发的农产品电商平台,致力于为农户和消费者搭建直接沟通的桥梁。平台采用微服务架构,支持多角色权限管理,提供完整的电商业务流程,让新鲜农产品直达餐桌。 -## 🛠 技术栈 +
-### 后端技术 -- **框架**: Spring Boot 2.7.14 -- **安全**: Spring Security + JWT认证 -- **数据库**: MySQL 8.0 + MyBatis Plus -- **缓存**: Redis -- **文件存储**: 腾讯云COS -- **支付**: 支付宝开放平台 -- **邮件**: Spring Boot Mail +### 🎯 核心优势 -### 前端技术 -- **框架**: Vue 3 + Vite -- **UI组件**: Element Plus -- **状态管理**: Pinia -- **路由**: Vue Router 4 -- **图表**: ECharts -- **HTTP客户端**: Axios +| 💎 技术先进 | 🔐 安全可靠 | 📱 响应式设计 | ⚡ 高性能 | +|:---:|:---:|:---:|:---:| +| Spring Boot + Vue3 | JWT + Spring Security | 多端适配 | Redis缓存优化 | -### 运维部署 -- **容器化**: Docker + Docker Compose -- **云服务**: 支持各类云平台部署 -- **反向代理**: Nginx -- **进程管理**: PM2(可选) +
+ +--- + +## ✨ 功能亮点 + + + + + + + + + +
+ +### 🛒 **用户端功能** +- 🔍 **智能商品搜索** - 分类筛选、价格排序 +- 🛍️ **购物车管理** - 实时更新、批量操作 +- 💳 **多种支付方式** - 支付宝、微信支付 +- 📍 **地址管理** - 多地址管理、默认地址 +- ⭐ **商品评价** - 图文评价、评分系统 +- 💬 **在线客服** - 实时聊天、问题解答 + + + +### 🏪 **商家端功能** +- 📦 **商品管理** - 批量上传、库存预警 +- 📊 **销售统计** - 实时数据、图表分析 +- 🚚 **订单处理** - 状态跟踪、物流管理 +- 💰 **收益分析** - 财务报表、提现管理 +- 🎨 **店铺装修** - 个性化展示 +- 📈 **营销工具** - 优惠券、促销活动 + +
+ +### 🔧 **管理员功能** +- 👥 **用户管理** - 用户审核、权限分配、行为监控 +- 🏢 **商家管理** - 商家入驻审核、资质验证、经营监管 +- 📋 **平台配置** - 系统参数、业务规则、功能开关 +- 📊 **数据分析** - 运营报表、用户画像、商业洞察 + +
+ +--- + +## 🏗️ 技术架构 + +
+ +```mermaid +graph TB + A[用户端 Vue3] --> B[Nginx] + C[商家端 Vue3] --> B + D[管理端 Vue3] --> B + B --> E[Spring Boot API Gateway] + E --> F[用户服务] + E --> G[商品服务] + E --> H[订单服务] + E --> I[支付服务] + F --> J[(MySQL)] + G --> J + H --> J + I --> J + E --> K[(Redis)] + E --> L[腾讯云COS] + I --> M[支付宝API] +``` + +
+ +### 🛠️ 技术栈详情 + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
分层技术选型版本说明
后端Spring Boot2.7.14核心框架
Spring Security-安全认证
MyBatis Plus-数据访问
MySQL8.0+主数据库
Redis6.0+缓存/会话
腾讯云COS-文件存储
前端Vue 33.0+前端框架
Element Plus-UI组件库
Pinia-状态管理
Vue Router4.0+路由管理
Axios-HTTP客户端
ECharts-数据可视化
运维Docker-容器化部署
Nginx-反向代理
Docker Compose-服务编排
+
+ +--- ## 📋 环境要求 -### 开发环境 -- **Java**: JDK 8 或以上 -- **Node.js**: 16.0 或以上 -- **Maven**: 3.6 或以上 -- **MySQL**: 8.0 或以上 -- **Redis**: 6.0 或以上 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
环境开发环境生产环境
操作系统Windows/macOS/LinuxLinux (推荐 Ubuntu 20.04+)
JavaJDK 8+JDK 8+
Node.js16.0+16.0+
数据库MySQL 8.0+MySQL 8.0+
缓存Redis 6.0+Redis 6.0+
内存4GB+8GB+
存储10GB+50GB+
+
-### 生产环境 -- **服务器**: Linux (推荐 Ubuntu 20.04+) -- **内存**: 建议 2GB 以上 -- **存储**: 建议 20GB 以上 -- **网络**: 需要公网IP或域名(用于支付回调) +--- ## 🚀 快速开始 -### 1. 克隆项目 +### 📥 1. 项目克隆 ```bash +# 克隆项目 git clone https://git.sq0715.com/qin/SunnyFarm.git + +# 进入项目目录 cd SunnyFarm ``` -### 2. 配置文件设置 +### ⚙️ 2. 环境配置 -#### 后端配置 - -复制配置模板并填入你的配置信息: +#### 🎯 后端配置 ```bash -# 开发环境配置 -cp backend/src/main/resources/application-dev.yml.example backend/src/main/resources/application-dev.yml +# 复制配置模板 +cp backend/src/main/resources/application-dev.yml.example \ + backend/src/main/resources/application-dev.yml -# 生产环境配置 -cp backend/src/main/resources/application-prod.yml.example backend/src/main/resources/application-prod.yml +# 编辑配置文件 +vim backend/src/main/resources/application-dev.yml ``` -### 3. 数据库初始化 +#### 🔧 关键配置项 -```bash -# 创建数据库 -mysql -u root -p -e "CREATE DATABASE sunnyfarm CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" +
+📊 数据库配置 -# 导入数据库结构和初始数据 -mysql -u your_username -p sunnyfarm < sql/sunnyfarm.sql -mysql -u your_username -p sunnyfarm < sql/init_inventory.sql -``` - -### 4. 启动后端服务 - -```bash -cd backend -mvn clean install -mvn spring-boot:run -``` - -服务启动后访问: http://localhost:8080/api/init/status - -### 5. 启动前端服务 - -```bash -cd frontend -npm install -npm run dev -``` - -前端启动后访问: http://localhost:3000 - -## ⚙️ 配置说明 - -### 数据库配置 ```yaml spring: datasource: - url: jdbc:mysql://your-mysql-host:3306/sunnyfarm - username: your-db-username - password: your-db-password + url: jdbc:mysql://localhost:3306/sunnyfarm?useSSL=false&serverTimezone=Asia/Shanghai + username: your_username + password: your_password + driver-class-name: com.mysql.cj.jdbc.Driver ``` +
+ +
+🔴 Redis配置 -### Redis配置 ```yaml spring: redis: - host: your-redis-host + host: localhost port: 6379 - password: your-redis-password + password: your_redis_password + timeout: 5000ms + lettuce: + pool: + max-active: 8 + max-wait: -1ms + max-idle: 8 + min-idle: 0 ``` +
+ +
+📧 邮件服务配置 -### 邮件服务配置 (QQ邮箱示例) ```yaml spring: mail: host: smtp.qq.com port: 465 - username: your-email@qq.com - password: your-email-auth-code # QQ邮箱授权码 + username: your_email@qq.com + password: your_email_auth_code + protocol: smtp + properties: + mail.smtp.auth: true + mail.smtp.ssl.enable: true ``` +
+ +
+☁️ 腾讯云COS配置 -### 腾讯云COS配置 ```yaml tencent: cos: - secret-id: your-tencent-cos-secret-id - secret-key: your-tencent-cos-secret-key + secret-id: your_secret_id + secret-key: your_secret_key region: ap-guangzhou - bucket: your-bucket-name + bucket: your_bucket_name + base-url: https://your-bucket.cos.ap-guangzhou.myqcloud.com ``` +
+ +
+💳 支付宝配置 -### 支付宝配置 ```yaml alipay: - app-id: your-alipay-app-id - app-private-key: your-alipay-app-private-key - alipay-public-key: your-alipay-public-key - notify-url: http://your-domain:8080/api/payment/alipay/notify - return-url: http://your-domain:3000/orders?payment=success + app-id: your_app_id + app-private-key: your_private_key + alipay-public-key: alipay_public_key + notify-url: https://your-domain.com/api/payment/alipay/notify + return-url: https://your-domain.com/orders?payment=success + gateway-url: https://openapi.alipaydev.com/gateway.do # 沙箱环境 ``` +
-**重要**: 支付宝回调地址必须是公网可访问的地址,不能使用localhost - -### JWT配置 -```yaml -jwt: - secret: your-jwt-secret-key - expiration: 86400000 # 24小时,单位毫秒 -``` - -## 🐳 Docker部署 - -### 使用Docker Compose部署 +### 🗄️ 3. 数据库初始化 ```bash -# 构建并启动服务 +# 创建数据库 +mysql -u root -p -e "CREATE DATABASE sunnyfarm CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" + +# 导入数据库结构 +mysql -u root -p sunnyfarm < sql/sunnyfarm.sql + +# 导入初始化数据 +mysql -u root -p sunnyfarm < sql/init_inventory.sql +``` + +### 🔥 4. 启动服务 + +#### 🖥️ 后端服务 + +```bash +cd backend + +# 安装依赖并启动 +mvn clean install +mvn spring-boot:run + +# 或者使用jar包启动 +java -jar target/sunnyfarm-backend-1.0.0.jar +``` + +#### 🌐 前端服务 + +```bash +cd frontend + +# 安装依赖 +npm install + +# 启动开发服务器 +npm run dev + +# 构建生产版本 +npm run build +``` + +### 🎯 5. 访问应用 + +
+ +| 服务 | 地址 | 说明 | +|:---:|:---:|:---:| +| 🖥️ **前端应用** | http://localhost:3000 | 用户界面 | +| 🔧 **后端API** | http://localhost:8080 | API服务 | +| 📊 **健康检查** | http://localhost:8080/api/init/status | 服务状态 | + +
+ +--- + +## 🐳 容器化部署 + +### 🚀 一键部署 + +```bash +# 使用 Docker Compose 一键启动所有服务 docker-compose up -d -# 查看服务状态 +# 查看服务状态 docker-compose ps -# 查看日志 +# 查看实时日志 docker-compose logs -f ``` -### 手动Docker部署 +### 🔧 手动部署 + +
+点击展开详细部署步骤 ```bash -# 构建后端镜像 -cd backend -docker build -t sunnyfarm-backend . +# 1. 构建后端镜像 +cd backend +docker build -t sunnyfarm-backend:latest . -# 构建前端镜像 +# 2. 构建前端镜像 cd ../frontend -docker build -t sunnyfarm-frontend . +docker build -t sunnyfarm-frontend:latest . -# 启动服务 -docker run -d -p 8080:8080 --name sunnyfarm-backend sunnyfarm-backend -docker run -d -p 3000:3000 --name sunnyfarm-frontend sunnyfarm-frontend +# 3. 创建网络 +docker network create sunnyfarm-network + +# 4. 启动数据库 +docker run -d \ + --name sunnyfarm-mysql \ + --network sunnyfarm-network \ + -e MYSQL_ROOT_PASSWORD=root123 \ + -e MYSQL_DATABASE=sunnyfarm \ + -p 3306:3306 \ + mysql:8.0 + +# 5. 启动Redis +docker run -d \ + --name sunnyfarm-redis \ + --network sunnyfarm-network \ + -p 6379:6379 \ + redis:6-alpine + +# 6. 启动后端服务 +docker run -d \ + --name sunnyfarm-backend \ + --network sunnyfarm-network \ + -p 8080:8080 \ + sunnyfarm-backend:latest + +# 7. 启动前端服务 +docker run -d \ + --name sunnyfarm-frontend \ + --network sunnyfarm-network \ + -p 3000:3000 \ + sunnyfarm-frontend:latest ``` +
+ +--- + ## 🌍 生产环境部署 -### 1. 服务器准备 +### 🏗️ 服务器准备 ```bash -# 安装基础软件 -sudo apt update && sudo apt install -y git docker.io docker-compose nginx +# 更新系统 +sudo apt update && sudo apt upgrade -y + +# 安装必要软件 +sudo apt install -y docker.io docker-compose nginx ufw # 启动Docker服务 sudo systemctl start docker sudo systemctl enable docker + +# 配置防火墙 +sudo ufw allow 22 +sudo ufw allow 80 +sudo ufw allow 443 +sudo ufw --force enable ``` -### 2. 克隆项目并配置 +### 🔧 Nginx配置 -```bash -git clone https://git.sq0715.com/qin/SunnyFarm.git -cd SunnyFarm +
+Nginx反向代理配置 -# 配置生产环境文件 -cp backend/src/main/resources/application-prod.yml.example backend/src/main/resources/application-prod.yml -# 编辑配置文件,填入生产环境配置信息 -vim backend/src/main/resources/application-prod.yml +```nginx +server { + listen 80; + server_name your-domain.com; + + # 前端静态文件 + location / { + proxy_pass http://localhost:3000; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + # 后端API + location /api/ { + proxy_pass http://localhost:8080/api/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + + # 文件上传大小限制 + client_max_body_size 10M; +} ``` -### 3. 部署启动 +
-```bash -# 构建并启动 -docker-compose up -d +--- -# 检查服务状态 -docker-compose ps -curl http://your-server-ip:8080/api/init/status -``` +## 📚 API接口文档 -## 📚 API文档 +### 🔐 认证模块 -### 认证接口 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
方法路径描述权限
POST/api/user/register用户注册公开
POST/api/user/login用户登录公开
POST/api/merchant/login商家登录公开
POST/api/admin/login管理员登录公开
POST/api/auth/logout退出登录登录用户
+
-| 方法 | 路径 | 说明 | -|------|------|------| -| POST | `/api/user/login` | 用户登录 | -| POST | `/api/user/register` | 用户注册 | -| POST | `/api/merchant/login` | 商家登录 | -| POST | `/api/admin/login` | 管理员登录 | +### 🛍️ 商品模块 -### 商品接口 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
方法路径描述权限
GET/api/product/list商品列表公开
GET/api/product/{id}商品详情公开
POST/api/product/create创建商品商家
PUT/api/product/{id}更新商品商家
DELETE/api/product/{id}删除商品商家
+
-| 方法 | 路径 | 说明 | -|------|------|------| -| GET | `/api/product/list` | 商品列表 | -| GET | `/api/product/{id}` | 商品详情 | -| POST | `/api/product/create` | 创建商品(商家) | -| PUT | `/api/product/{id}` | 更新商品(商家) | +### 📦 订单模块 -### 订单接口 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
方法路径描述权限
POST/api/order/create创建订单用户
GET/api/order/list订单列表用户/商家
GET/api/order/{id}订单详情用户/商家
POST/api/order/{id}/pay订单支付用户
PUT/api/order/{id}/status更新订单状态商家
+
-| 方法 | 路径 | 说明 | -|------|------|------| -| POST | `/api/order/create` | 创建订单 | -| GET | `/api/order/list` | 订单列表 | -| GET | `/api/order/{id}` | 订单详情 | -| POST | `/api/order/{id}/pay` | 订单支付 | +--- -## 🎯 默认账号 +## 🎯 测试账号 -### 管理员账号 -- 用户名: `admin` -- 密码: `admin123` +
-### 测试商家账号 -- 用户名: `merchant` -- 密码: `merchant123` +### 🔑 默认账号信息 -### 测试用户账号 -- 用户名: `user` -- 密码: `user123` + + + + + + + + + + + + + + + + + + + + + + + + + +
角色用户名密码权限说明
🔧 管理员adminadmin123系统管理、用户管理、数据统计
🏪 商家merchantmerchant123商品管理、订单处理、销售统计
👤 用户useruser123购物下单、个人中心、订单管理
-## 📝 开发说明 +> ⚠️ **安全提醒**: 生产环境请立即修改默认密码! -### 项目结构 +
+ +--- + +## 📁 项目结构 ``` SunnyFarm/ -├── backend/ # 后端Spring Boot项目 -│ ├── src/main/java/ # Java源码 -│ ├── src/main/resources/ # 配置文件 -│ └── pom.xml # Maven配置 -├── frontend/ # 前端Vue项目 -│ ├── src/ # Vue源码 -│ ├── public/ # 静态资源 -│ └── package.json # NPM配置 -├── sql/ # 数据库脚本 -├── docker-compose.yml # Docker编排 -└── README.md # 项目文档 +├── 📁 backend/ # 🖥️ 后端Spring Boot项目 +│ ├── 📁 src/main/java/ # ☕ Java源码 +│ │ ├── 📁 controller/ # 🌐 控制器层 +│ │ ├── 📁 service/ # 🔧 业务逻辑层 +│ │ ├── 📁 mapper/ # 🗄️ 数据访问层 +│ │ ├── 📁 model/ # 📋 数据模型 +│ │ └── 📁 config/ # ⚙️ 配置类 +│ ├── 📁 src/main/resources/ # 📄 配置文件 +│ │ ├── 📄 application.yml # 主配置文件 +│ │ ├── 📄 application-dev.yml # 开发环境配置 +│ │ └── 📄 application-prod.yml # 生产环境配置 +│ └── 📄 pom.xml # Maven依赖配置 +├── 📁 frontend/ # 🌐 前端Vue项目 +│ ├── 📁 src/ # Vue源码 +│ │ ├── 📁 components/ # 🧩 组件库 +│ │ ├── 📁 views/ # 📱 页面视图 +│ │ ├── 📁 router/ # 🗺️ 路由配置 +│ │ ├── 📁 store/ # 💾 状态管理 +│ │ └── 📁 utils/ # 🔧 工具函数 +│ ├── 📁 public/ # 🖼️ 静态资源 +│ └── 📄 package.json # NPM依赖配置 +├── 📁 sql/ # 🗄️ 数据库脚本 +│ ├── 📄 sunnyfarm.sql # 数据库结构 +│ └── 📄 init_inventory.sql # 初始化数据 +├── 📁 docker/ # 🐳 Docker配置 +├── 📄 docker-compose.yml # 容器编排配置 +├── 📄 nginx.conf # Nginx配置 +└── 📄 README.md # 项目说明文档 ``` -### 开发规范 +--- -- 代码格式化: 使用项目配置的格式化规则 -- 提交规范: 使用语义化提交信息 -- 分支管理: 使用Git Flow工作流 -- 代码审查: 重要功能需要代码审查 +## 🔄 开发流程 + +### 🌿 Git工作流 + +```mermaid +gitgraph + commit id: "Initial" + branch develop + checkout develop + commit id: "Feature A" + commit id: "Feature B" + branch feature/user-auth + checkout feature/user-auth + commit id: "Add login" + commit id: "Add register" + checkout develop + merge feature/user-auth + checkout main + merge develop + commit id: "Release v1.0" +``` + +### 📝 提交规范 + +```bash +# 功能开发 +git commit -m "feat: 添加用户登录功能" + +# 问题修复 +git commit -m "fix: 修复商品搜索bug" + +# 文档更新 +git commit -m "docs: 更新API文档" + +# 样式调整 +git commit -m "style: 调整商品卡片样式" + +# 重构代码 +git commit -m "refactor: 优化订单查询逻辑" +``` + +--- + +## 🔍 常见问题 + +
+❓ 启动时数据库连接失败 + +**解决方案**: +1. 检查MySQL服务是否启动 +2. 验证数据库连接配置是否正确 +3. 确认数据库用户权限 +4. 检查防火墙设置 + +```bash +# 检查MySQL服务状态 +sudo systemctl status mysql + +# 测试数据库连接 +mysql -h localhost -u username -p +``` +
+ +
+❓ 支付回调接收失败 + +**解决方案**: +1. 确保回调URL是公网可访问的 +2. 检查支付宝配置是否正确 +3. 验证SSL证书配置 +4. 查看支付宝开发者后台日志 + +```bash +# 测试回调URL可访问性 +curl -X POST https://your-domain.com/api/payment/alipay/notify +``` +
+ +
+❓ 文件上传失败 + +**解决方案**: +1. 检查腾讯云COS配置 +2. 验证存储桶权限设置 +3. 确认文件大小限制 +4. 检查网络连接 + +```yaml +# 增加文件上传大小限制 +spring: + servlet: + multipart: + max-file-size: 10MB + max-request-size: 50MB +``` +
+ +--- + +## 🚀 性能优化建议 + +### 🔧 后端优化 + +```java +// Redis缓存优化 +@Cacheable(value = "products", key = "#categoryId") +public List getProductsByCategory(Long categoryId) { + return productMapper.selectByCategory(categoryId); +} + +// 数据库连接池优化 +spring: + datasource: + hikari: + maximum-pool-size: 20 + minimum-idle: 5 + connection-timeout: 30000 +``` + +### 🌐 前端优化 + +```javascript +// 路由懒加载 +const routes = [ + { + path: '/products', + component: () => import('@/views/Products.vue') + } +] + +// 组件缓存 + + + +``` + +--- ## 🤝 贡献指南 -1. Fork本项目 -2. 创建特性分支 (`git checkout -b feature/AmazingFeature`) -3. 提交更改 (`git commit -m 'Add some AmazingFeature'`) -4. 推送分支 (`git push origin feature/AmazingFeature`) -5. 创建Pull Request +我们欢迎所有形式的贡献!🎉 + +### 🌟 贡献方式 + +- 🐛 **问题反馈**: 发现bug请提交Issue +- 💡 **功能建议**: 有好想法请告诉我们 +- 📖 **文档改进**: 帮助完善文档 +- 🔧 **代码贡献**: 提交Pull Request + +### 📋 贡献流程 + +1. **🍴 Fork项目** - 点击右上角Fork按钮 +2. **🌿 创建分支** - `git checkout -b feature/amazing-feature` +3. **💻 编写代码** - 遵循项目编码规范 +4. **✅ 测试验证** - 确保功能正常工作 +5. **📝 提交更改** - `git commit -m 'feat: add amazing feature'` +6. **🚀 推送分支** - `git push origin feature/amazing-feature` +7. **🔄 提交PR** - 创建Pull Request + +### 📏 编码规范 + +- **Java**: 遵循阿里巴巴Java开发规范 +- **Vue**: 遵循Vue官方风格指南 +- **数据库**: 遵循MySQL命名规范 +- **接口**: 遵循RESTful API设计原则 + +--- ## 📄 许可证 -本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情 +本项目基于 [MIT License](https://opensource.org/licenses/MIT) 开源协议。 -## 📞 联系方式 +``` +MIT License -- 项目地址: https://git.sq0715.com/qin/SunnyFarm -- 问题反馈: 请在GitHub Issues中提交 -- 邮箱联系: 852326703@qq.com +Copyright (c) 2024 SunnyFarm Team -## 🙏 致谢 +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. +``` + +--- + +
+ +## 📞 联系我们 + +[![项目地址](https://img.shields.io/badge/项目地址-SunnyFarm-brightgreen?style=for-the-badge&logo=git&logoColor=white)](https://git.sq0715.com/qin/SunnyFarm) +[![邮箱联系](https://img.shields.io/badge/邮箱-852326703@qq.com-blue?style=for-the-badge&logo=gmail&logoColor=white)](mailto:852326703@qq.com) +[![手机号码](https://img.shields.io/badge/手机号码-123456789-orange?style=for-the-badge&logo=tencent-qq&logoColor=white)]() + +### 🙏 特别感谢 感谢所有为本项目做出贡献的开发者们! --- -**注意**: 本项目仅供学习和研究使用,请勿用于商业用途。使用前请确保遵守相关法律法规。 \ No newline at end of file +**⭐ 如果这个项目对你有帮助,请给我们一个星标!** + +*让新鲜农产品直达每个家庭* 🌱✨ + +
+ +--- + +
+ +🌱 Built with ❤️ by SunnyFarm Team • +源码地址 • +回到顶部 + +
+