zhibo/deploy_records_debug.bat

53 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/3] 编译后端项目...
cd /d "%~dp0Zhibo\zhibo-h"
call mvn clean package -DskipTests -pl crmeb-front -am
if errorlevel 1 (
echo 后端编译失败!
pause
exit /b 1
)
echo.
echo [2/3] 重启后端服务...
echo 请手动重启后端服务,或使用以下命令:
echo java -jar crmeb-front/target/crmeb-front.jar
echo.
echo [3/3] 编译Android应用...
cd /d "%~dp0android-app"
call gradlew assembleDebug
if errorlevel 1 (
echo Android编译失败
pause
exit /b 1
)
echo.
echo ========================================
echo 部署完成!
echo ========================================
echo.
echo 调试步骤:
echo 1. 重启后端服务
echo 2. 安装新的APK到设备/模拟器
echo 3. 登录应用
echo 4. 进入"我的记录"页面
echo 5. 查看Logcat日志过滤TAG: MyRecords, ApiClient, FrontTokenInterceptor
echo 6. 查看后端日志(搜索关键字: [FrontTokenInterceptor], [FrontTokenComponent], 【观看历史】)
echo.
echo 预期日志输出:
echo - Android端: "Token状态: 存在, 长度=32, 前20字符=xxx..."
echo - Android端: "添加Token到请求头: xxx..."
echo - 后端: "[FrontTokenInterceptor] URI=api/front/activity/view/history, rawToken=xxx..."
echo - 后端: "[FrontTokenComponent] getUserId: rawToken=xxx..., userId=121"
echo - 后端: "【观看历史】返回结果: userId=121, total=18, listSize=18"
echo.
pause