peixue-dev/Archive/[一次性]多身份功能-快速部署-2026-02-28.bat

62 lines
1.5 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
chcp 65001 >nul
echo ============================================
echo 多身份功能 - 快速部署脚本
echo ============================================
echo.
echo [步骤1/4] 执行数据库脚本...
echo ----------------------------------------
mysql -h 115.190.64.57 -P 3306 -u root -p123456 peidu < "Archive\[一次性]创建user_roles表-2026-02-28.sql"
if %errorlevel% neq 0 (
echo ❌ 数据库脚本执行失败!
pause
exit /b 1
)
echo ✅ 数据库脚本执行成功!
echo.
echo [步骤2/4] 编译后端...
echo ----------------------------------------
cd peidu\backend
call mvn clean compile -DskipTests
if %errorlevel% neq 0 (
echo ❌ 后端编译失败!
cd ..\..
pause
exit /b 1
)
echo ✅ 后端编译成功!
cd ..\..
echo.
echo [步骤3/4] 编译前端...
echo ----------------------------------------
cd peidu\uniapp
call npm run build:mp-weixin
if %errorlevel% neq 0 (
echo ❌ 前端编译失败!
cd ..\..
pause
exit /b 1
)
echo ✅ 前端编译成功!
cd ..\..
echo.
echo [步骤4/4] 验证数据库...
echo ----------------------------------------
mysql -h 115.190.64.57 -P 3306 -u root -p123456 peidu < "Archive\[一次性]验证user_roles表-2026-02-28.sql"
echo.
echo ============================================
echo 🎉 多身份功能部署完成!
echo ============================================
echo.
echo 下一步:
echo 1. 重启后端服务
echo 2. 打开微信开发者工具测试前端
echo 3. 测试API接口GET /api/user/roles/list
echo.
pause