|
2 days ago | |
---|---|---|
src/main | 2 days ago | |
.gitignore | 1 month ago | |
README.md | 4 weeks ago | |
install.sh | 1 month ago | |
pom.xml | 4 weeks ago | |
run.sh | 1 month ago | |
start.sh | 4 weeks ago |
基于SpringBoot的智能物流管理系统后端API,提供车辆管理、称重记录、供应商管理等核心功能,支持AK/SK签名认证。
spring:
datasource:
url: jdbc:sqlserver://localhost:1433;databaseName=fuquan_db;encrypt=false;trustServerCertificate=true
username: your_username
password: your_password
api:
client:
ak: your_access_key_here
sk: your_secret_key_here
mvn spring-boot:run
# 编译打包
mvn clean package
# 快速启动
chmod +x run.sh
./run.sh
# 或直接运行JAR
java -jar target/webapi-0.0.1-SNAPSHOT.jar
# 安装脚本
chmod +x install.sh
./install.sh
# 启动服务
sudo systemctl start fuquan-webapi
sudo systemctl enable fuquan-webapi
# 查看状态
sudo systemctl status fuquan-webapi
访问地址: http://localhost:8806/fuquanapi
API文档: http://localhost:8806/fuquanapi/swagger-ui.html
ak: your_access_key
timestamp: 1640995200000
signature: calculated_signature
// 签名 = MD5(ak + sk + timestamp)
String signature = MD5(accessKey + secretKey + timestamp);
注意: 时间戳与服务器时间差不能超过10分钟
POST /api/sync/single
- 同步单条数据POST /api/sync/batch
- 批量同步指定ID的数据POST /api/sync/unuploaded
- 同步所有未上传的数据POST /api/sync/incremental
- 增量同步数据(基于皮重时间)POST /api/sync/all
- 全量同步所有数据POST /api/sync/unuploaded/batch?batchSize=500
- 分批同步未上传数据POST /api/sync/incremental/batch?batchSize=500
- 分批增量同步POST /api/sync/all/batch?batchSize=500
- 分批全量同步分批处理优势:
POST /api/supplier/page/conditions
POST /api/transport-company/page/conditions
POST /api/transfer-record/page/conditions
POST /api/weighing-record/page/conditions
src/main/java/com/example/webapi/
├── controller/ # 控制器层
├── service/ # 服务层
├── repository/ # 数据访问层
├── entity/ # 实体类
├── dto/ # 数据传输对象
├── interceptor/ # 拦截器
└── util/ # 工具类
脚本 | 用途 | 适用场景 |
---|---|---|
run.sh |
快速启动 | 开发测试 |
start.sh |
完整管理 | 生产环境 |
install.sh |
自动安装 | 首次部署 |
# 快速启动(开发环境)
./run.sh
# 生产环境管理
./start.sh start # 启动应用
./start.sh stop # 停止应用
./start.sh restart # 重启应用
./start.sh status # 查看状态
./start.sh logs # 查看日志
# 自动安装部署
./install.sh
# 启动服务
sudo systemctl start fuquan-webapi
# 停止服务
sudo systemctl stop fuquan-webapi
# 重启服务
sudo systemctl restart fuquan-webapi
# 查看状态
sudo systemctl status fuquan-webapi
# 开机自启
sudo systemctl enable fuquan-webapi
# 查看日志
sudo journalctl -u fuquan-webapi -f
chmod +x *.sh
福泉WebAPI - 让物流管理更智能! 🚀