smart-order-system
基于 Django + Vue 3 的在线点单与门店运营系统,面向校园、小型餐饮门店和开源课程实践。V3.0.0 已从“能下单的 Demo”升级为“可演示、可测试、可复用”的经营闭环:顾客点单、优惠券、模拟钱包、订单追踪、用户反馈、商家履约、商品库存、运营指标和定时发券都能串起来。
本项目的充值、买券和余额支付均为课程演示用模拟余额,不接入真实支付,不作为商业收款系统使用。
http://124.223.3.214:20707/customer/
demo / demo123
http://124.223.3.214:20707/merchant/
merchant1 / 123456
http://124.223.3.214:20707/api/health
本地构建后访问 http://127.0.0.1:8080/customer/ 和 http://127.0.0.1:8080/merchant/。
http://127.0.0.1:8080/customer/
http://127.0.0.1:8080/merchant/
详细说明见 docs/product-value.md。
docs/product-value.md
deepseek-v4-flash
python scripts/run_harness.py
.gitlab-ci.yml
python backend/manage.py issue_coupons
cd backend python -m venv venv # Windows venv\Scripts\activate # Linux/macOS source venv/bin/activate pip install -r requirements.txt python manage.py migrate python manage.py seed_data python manage.py runserver 0.0.0.0:8080 --noreload
cd frontend npm install npm run build
开发模式:
cd frontend npm run dev
仅验证后端:
python scripts/run_harness.py --skip-frontend
cd backend python manage.py issue_coupons
建议在服务器 cron 中配置每天 08:00 和 16:00 运行一次;CI/CD 也可把它作为计划任务的一部分。该命令只发放 auto_issue=True 且仍在有效期内的优惠券。
auto_issue=True
运行 python manage.py seed_data 后自动创建:
python manage.py seed_data
demo
demo123
student
student123
tester
tester123
merchant1
123456
merchant2
merchant3
所有接口统一返回 {code, message, data}。
{code, message, data}
GET /api/health
POST /api/user/register
POST /api/user/login
GET /api/user/profile
POST /api/user/recharge
GET /api/user/wallet
GET /api/menu
GET /api/menu/categories
GET /api/recommendations
GET /api/coupons
GET /api/user/coupons
POST /api/coupons/claim
POST /api/coupons/purchase
GET /api/cart
POST /api/cart/add
POST /api/cart/update
POST /api/cart/remove
POST /api/cart/clear
GET /api/order
POST /api/order/submit
POST /api/order/:id/cancel
POST /api/feedback
POST /api/merchant/login
GET /api/merchant/stats
GET /api/merchant/orders
GET/POST /api/merchant/menu
PUT/DELETE /api/merchant/menu/:id
POST /api/merchant/menu/:id/image
GET /api/merchant/feedback
POST /api/merchant/feedback/:id/status
GET/POST /api/merchant/coupons
POST /api/merchant/coupons/:id/issue
更多验收映射见 docs/sdd-harness.md。
docs/sdd-harness.md
docs/project-rubric-checklist.md
docs/ci-cd.md
docs/live-demo.md
docs/license-rationale.md
docs/pipeline-evaluation.md
CHANGELOG.md
生产环境通过环境变量注入,不建议把真实密钥提交到仓库:
SECRET_KEY= DEBUG=False ALLOWED_HOSTS=124.223.3.214,localhost,127.0.0.1 DATABASE_URL=mysql://user:password@host:3306/database DEEPSEEK_API_KEY= DEEPSEEK_MODEL=deepseek-v4-flash
仓库可以提交 .env.example 这类模板;真实数据库密码、面板账号、API Key 建议只放服务器环境变量或 CI/CD Secret。
.env.example
本项目采用 MIT License。选择 MIT 是为了降低课程实践、校园试点和二次开发的复用门槛;使用者可以复制、修改、分发和商业使用,但必须保留版权声明和许可证文本。详细边界见 docs/license-rationale.md。
最后更新:2026-06-24
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
智慧点单系统 (Smart Order System)
基于 Django + Vue 3 的在线点单与门店运营系统,面向校园、小型餐饮门店和开源课程实践。V3.0.0 已从“能下单的 Demo”升级为“可演示、可测试、可复用”的经营闭环:顾客点单、优惠券、模拟钱包、订单追踪、用户反馈、商家履约、商品库存、运营指标和定时发券都能串起来。
本项目的充值、买券和余额支付均为课程演示用模拟余额,不接入真实支付,不作为商业收款系统使用。
Live Demo
http://124.223.3.214:20707/customer/demo / demo123http://124.223.3.214:20707/merchant/merchant1 / 123456http://124.223.3.214:20707/api/health本地构建后访问
http://127.0.0.1:8080/customer/和http://127.0.0.1:8080/merchant/。项目价值
详细说明见
docs/product-value.md。V3.0.0 功能
顾客端
deepseek-v4-flash,未配置或异常时规则推荐兜底。商家端
工程化
python scripts/run_harness.py一键执行 Django 检查、迁移漂移检查、API 测试和前端构建。.gitlab-ci.yml支持 GitLink/GitLab 风格 CI,包含 DeepSeek 自动代码审查入口。python backend/manage.py issue_coupons支持定时发券,可由服务器 cron 或流水线定时调用。技术栈
快速开始
后端
前端
开发模式:
一键质量验证
仅验证后端:
定时发券
建议在服务器 cron 中配置每天 08:00 和 16:00 运行一次;CI/CD 也可把它作为计划任务的一部分。该命令只发放
auto_issue=True且仍在有效期内的优惠券。演示账号
运行
python manage.py seed_data后自动创建:demodemo123studentstudent123testertester123merchant1123456merchant2123456merchant3123456API 概览
所有接口统一返回
{code, message, data}。GET /api/healthPOST /api/user/register,POST /api/user/login,GET /api/user/profilePOST /api/user/recharge,GET /api/user/walletGET /api/menu,GET /api/menu/categories,GET /api/recommendationsGET /api/coupons,GET /api/user/coupons,POST /api/coupons/claim,POST /api/coupons/purchaseGET /api/cart,POST /api/cart/add,POST /api/cart/update,POST /api/cart/remove,POST /api/cart/clearGET /api/order,POST /api/order/submit,POST /api/order/:id/cancelPOST /api/feedbackPOST /api/merchant/login,GET /api/merchant/stats,GET /api/merchant/ordersGET/POST /api/merchant/menu,PUT/DELETE /api/merchant/menu/:id,POST /api/merchant/menu/:id/imageGET /api/merchant/feedback,POST /api/merchant/feedback/:id/statusGET/POST /api/merchant/coupons,POST /api/merchant/coupons/:id/issue更多验收映射见
docs/sdd-harness.md。核心数据模型
课程实践交付物
docs/project-rubric-checklist.mddocs/product-value.mddocs/sdd-harness.mddocs/ci-cd.mddocs/live-demo.mddocs/license-rationale.mddocs/pipeline-evaluation.mdCHANGELOG.md配置说明
生产环境通过环境变量注入,不建议把真实密钥提交到仓库:
仓库可以提交
.env.example这类模板;真实数据库密码、面板账号、API Key 建议只放服务器环境变量或 CI/CD Secret。已知边界
License
本项目采用 MIT License。选择 MIT 是为了降低课程实践、校园试点和二次开发的复用门槛;使用者可以复制、修改、分发和商业使用,但必须保留版权声明和许可证文本。详细边界见
docs/license-rationale.md。最后更新:2026-06-24