# sea_takeout **Repository Path**: AlEX_2473/sea_takeout ## Basic Information - **Project Name**: sea_takeout - **Description**: 滨海(苍穹)外卖 Axum + sea-orm + redis-rs - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: dev - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-11-17 - **Last Updated**: 2026-05-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 苍穹外卖 Rust 后端 > 技术使用 Axum, JWT, SeaORM, DragonflyDB(Redis)
> pingora在:https://gitee.com/AlEX_2473/pingora-proxy ## Preparation ``` yaml current system: Ubuntu 20.04.6 LTS (WSL) rust target: x86_64-unknown-linux-gnu rustc: 1.82.0 ``` ## 目录介绍 ``` tree migration // 迁移数据 │ └── ddl&dml.sql ├── sky_common // 与sky_takeout java版本相同 │ └── src ├── sky_pojo // 与sky_takeout java版本相同 │ └── src ├── src │ ├── bootstrap // 配置 相关 │ ├── controller // 控制层 │ ├── main.rs // 主函数 │ ├── mapper // 映射层 │ ├── middleware // 中间件 java版本拦截器 │ ├── router // 路由 │ └── service // 服务层 ``` [Requirements](Cargo.toml) ## Installation && Run ``` bash cargo install cargo-watch cargo watch -x run ``` ## others generate entities ``` shell apt install -y librust-openssl-sys-dev cargo install sea-orm-cli sea-orm-cli generate entity --with-serde both --database-url mysql://[user]:[pass]@[host]:[port]/[db] -o path/to/dictory ``` ## 代码统计 ``` bash (base) root@2473WorkStation:~/Project/course_design# cloc . --vcs=git 141 text files. 141 unique files. 6 files ignored. github.com/AlDanial/cloc v 1.82 T=0.15 s (899.1 files/s, 62260.0 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Rust 121 921 324 6308 SQL 5 219 108 1298 TOML 3 30 16 72 Markdown 1 20 0 65 XML 3 0 0 26 JSON 2 0 0 10 Bourne Shell 1 0 0 1 ------------------------------------------------------------------------------- SUM: 136 1190 448 7780 ------------------------------------------------------------------------------- ``` ## 其他 未做后端缓存(非redis) Todo: 定时任务以及Websocket使用微服务 订单支付需要微信相关SDK(只支持 go,java,php), go与Rust定制对应的FFI接口调用 由于微信审核严格后续可能会使用支付宝