@echo off
chcp 65001 >nul
echo ========================================
echo 流水分析接口测试脚本
echo ========================================
echo.

set BASE_URL=http://localhost:8080
set TOKEN=

echo [步骤1] 获取访问令牌
echo ----------------------------------------
curl -X POST "%BASE_URL%/login/test?username=admin&password=admin123"
echo.
echo.

echo [步骤2] 测试获取Token接口
echo ----------------------------------------
curl -X POST "%BASE_URL%/lsfx/test/getToken" ^
  -H "Content-Type: multipart/form-data" ^
  -F "projectNo=902000_202603021400" ^
  -F "entityName=902000_202603021400" ^
  -F "userId=testuser" ^
  -F "userName=测试用户" ^
  -F "orgCode=ORG001" ^
  -F "entityId=ENTITY001"
echo.
echo.

echo [步骤3] 测试拉取行内流水接口
echo ----------------------------------------
curl -X POST "%BASE_URL%/lsfx/test/fetchInnerFlow" ^
  -H "Content-Type: multipart/form-data" ^
  -F "groupId=456" ^
  -F "customerNo=CUST001" ^
  -F "dataChannelCode=CHANNEL001" ^
  -F "requestDateId=20260303" ^
  -F "dataStartDateId=20260101" ^
  -F "dataEndDateId=20260303" ^
  -F "uploadUserId=testuser"
echo.
echo.

echo [步骤4] 测试检查解析状态接口
echo ----------------------------------------
curl -X POST "%BASE_URL%/lsfx/test/checkParseStatus" ^
  -H "Content-Type: multipart/form-data" ^
  -F "groupId=456" ^
  -F "inprogressList=789,790"
echo.
echo.

echo [步骤5] 测试获取银行流水接口
echo ----------------------------------------
curl -X POST "%BASE_URL%/lsfx/test/getBankStatement" ^
  -H "Content-Type: multipart/form-data" ^
  -F "groupId=456" ^
  -F "logId=789" ^
  -F "pageNow=1" ^
  -F "pageSize=20"
echo.
echo.

echo ========================================
echo 测试完成！
echo ========================================
pause
