Files
zyt/sync_tracking_numbers.bat
T
2026-04-07 18:13:03 +08:00

36 lines
759 B
Batchfile

@echo off
chcp 65001 >nul
echo ========================================
echo 同步现有订单快递单号到物流追踪表
echo ========================================
echo.
cd /d %~dp0server
echo [1/2] 创建物流追踪表...
php think migrate:run
if errorlevel 1 (
echo 错误:创建表失败
pause
exit /b 1
)
echo.
echo [2/2] 同步现有快递单号...
mysql -u root -p -e "source database/migrations/sync_existing_tracking_numbers.sql"
if errorlevel 1 (
echo 错误:同步失败
pause
exit /b 1
)
echo.
echo ========================================
echo 同步完成!
echo ========================================
echo.
echo 现在可以运行定时任务测试:
echo php think express:auto-update
echo.
pause