Files
zyt/install_appointment_system.bat
T
2026-03-04 15:32:30 +08:00

124 lines
3.3 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.
REM 检查是否在项目根目录
if not exist "server" (
echo 错误: 请在项目根目录运行此脚本
pause
exit /b 1
)
if not exist "admin" (
echo 错误: 请在项目根目录运行此脚本
pause
exit /b 1
)
echo 步骤 1/4: 检查后端文件...
set all_exist=1
if exist "server\app\common\model\doctor\Appointment.php" (
echo √ server\app\common\model\doctor\Appointment.php
) else (
echo × server\app\common\model\doctor\Appointment.php ^(不存在^)
set all_exist=0
)
if exist "server\app\adminapi\controller\doctor\AppointmentController.php" (
echo √ server\app\adminapi\controller\doctor\AppointmentController.php
) else (
echo × server\app\adminapi\controller\doctor\AppointmentController.php ^(不存在^)
set all_exist=0
)
if exist "server\app\adminapi\logic\doctor\AppointmentLogic.php" (
echo √ server\app\adminapi\logic\doctor\AppointmentLogic.php
) else (
echo × server\app\adminapi\logic\doctor\AppointmentLogic.php ^(不存在^)
set all_exist=0
)
if exist "server\app\adminapi\validate\doctor\AppointmentValidate.php" (
echo √ server\app\adminapi\validate\doctor\AppointmentValidate.php
) else (
echo × server\app\adminapi\validate\doctor\AppointmentValidate.php ^(不存在^)
set all_exist=0
)
if exist "server\app\adminapi\lists\doctor\AppointmentLists.php" (
echo √ server\app\adminapi\lists\doctor\AppointmentLists.php
) else (
echo × server\app\adminapi\lists\doctor\AppointmentLists.php ^(不存在^)
set all_exist=0
)
if exist "server\sql\doctor_appointment.sql" (
echo √ server\sql\doctor_appointment.sql
) else (
echo × server\sql\doctor_appointment.sql ^(不存在^)
set all_exist=0
)
if %all_exist%==0 (
echo.
echo 错误: 部分文件不存在,请检查
pause
exit /b 1
)
echo.
echo 步骤 2/4: 创建数据库表...
echo 请手动执行以下SQL文件:
echo server\sql\doctor_appointment.sql
echo.
echo 可以使用以下方式之一:
echo 1. phpMyAdmin导入
echo 2. MySQL命令行: mysql -u username -p database ^< server\sql\doctor_appointment.sql
echo 3. Navicat等数据库工具导入
echo.
pause
echo.
echo 步骤 3/4: 清除缓存...
cd server
php think clear
if %errorlevel%==0 (
echo √ 缓存清除成功
) else (
echo × 缓存清除失败
)
cd ..
echo.
echo 步骤 4/4: 验证安装...
echo 检查控制器文件...
if exist "server\app\adminapi\controller\doctor\AppointmentController.php" (
echo √ AppointmentController.php 存在
) else (
echo × AppointmentController.php 不存在
)
echo.
echo ================================
echo 安装完成!
echo ================================
echo.
echo 后续步骤:
echo 1. 确保医生有排班数据 ^(la_doctor_roster表^)
echo 2. 在后台权限管理中添加预约相关权限
echo 3. 测试API接口:
echo GET /adminapi/doctor.appointment/availableSlots
echo POST /adminapi/doctor.appointment/create
echo POST /adminapi/doctor.appointment/cancel
echo GET /adminapi/doctor.appointment/lists
echo.
echo 详细文档请查看:
echo - server\APPOINTMENT_BACKEND_SETUP.md
echo - admin\APPOINTMENT_SYSTEM.md
echo.
pause