Update README.md to include comprehensive documentation for ThinkPHP 8, featuring installation instructions, new features, sponsorship details, and links to resources.

This commit is contained in:
杨志
2026-01-05 10:10:51 +08:00
parent 66242a9e21
commit e41dd33d23
49 changed files with 2439 additions and 2 deletions

80
test_match_simple.php Normal file
View File

@@ -0,0 +1,80 @@
<?php
// 测试简化后的匹配度接口(只返回分数)
require __DIR__ . '/vendor/autoload.php';
// 岗位信息
$position = [
"position_require" => [
"学历要求" => "本科及以上",
"学位要求" => "学士及以上",
"年龄要求" => "18周岁以上、35周岁以下。",
"其他资格条件" => "适合男性。",
"专业(学科)类别" => "计算机科学与技术类,电气、电子及自动化类"
]
];
// 简历信息1不通过硬性条件年龄超限、专业不匹配
$resume1 = [
"birth_date" => "1989-03-01", // 36岁
"gender" => "",
"work_experience" => "无基层工作年限",
"education" => [
[
"education_level" => "硕士研究生",
"degree" => "硕士",
"majors_name" => "逻辑学"
],
[
"education_level" => "硕士研究生",
"degree" => "硕士",
"majors_name" => "伦理学"
]
]
];
// 简历信息2通过硬性条件
$resume2 = [
"birth_date" => "1995-03-01", // 30岁
"gender" => "",
"work_experience" => "3年基层工作年限",
"education" => [
[
"education_level" => "硕士研究生",
"degree" => "硕士",
"majors_name" => "计算机科学与技术"
]
]
];
// 加载ThinkPHP框架
$app = new think\App();
$app->initialize();
// 创建匹配服务实例
$matchService = new app\service\MatchService();
echo "========================================\n";
echo "岗位简历匹配度测试(简化版 - 只返回分数)\n";
echo "========================================\n\n";
// 测试案例1不通过硬性条件
echo "【测试案例1不通过硬性条件】\n";
echo "----------------------------------------\n";
echo "简历信息36岁专业逻辑学、伦理学\n";
$score1 = $matchService->calculateMatchScore($position, $resume1);
echo "匹配度分数: {$score1}/100分\n";
echo "说明: 硬性条件不满足年龄超限、专业不匹配返回0分\n\n";
// 测试案例2通过硬性条件
echo "【测试案例2通过硬性条件】\n";
echo "----------------------------------------\n";
echo "简历信息30岁专业计算机科学与技术有基层工作经历\n";
$score2 = $matchService->calculateMatchScore($position, $resume2);
echo "匹配度分数: {$score2}/100分\n";
echo "说明: 通过硬性条件筛选,进行软性条件评分\n\n";
echo "========================================\n";
echo "测试完成\n";
echo "========================================\n";