Files
cunkebao_v3/Server/script/seed_ai_lead_demo.php
Manus AI 5517457929 sync: 以本地为准同步全量变更至 GitHub
含四端需求文档、前端/后端/超管/触客宝迭代及部署脚本更新;未拉取远程。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 04:24:56 +08:00

62 lines
2.1 KiB
PHP
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.

<?php
/**
* 触客宝 · 灌入演示 AI 获客客资(本地联调用)
* 用法docker compose exec server php script/seed_ai_lead_demo.php [companyId]
*/
require __DIR__ . '/../thinkphp/base.php';
$app = new think\App();
$app->initialize();
$companyId = isset($argv[1]) ? (int)$argv[1] : 2130;
$now = time();
\app\chukebao\controller\AiLeadController::ingest([
'companyId' => $companyId,
'nickname' => '张先生·魔兽一键宏',
'phone' => '13800138001',
'unionId' => 'demo_lead_001',
'planName' => '场景获客·抖音口播',
'tags' => ['高意向', '魔兽玩家', '一键宏'],
'poolKeywordsText' => '一键宏,军训,解放双手',
'rfmLevel' => 'A',
'rfmScore' => 72,
'intention' => '咨询',
'behaviorTimeline' => [
['time' => date('Y-m-d H:i', $now - 3600), 'action' => '浏览落地页', 'detail' => '老坑爹一键宏介绍'],
['time' => date('Y-m-d H:i', $now - 1800), 'action' => '提交表单', 'detail' => '留下手机号'],
],
]);
\app\chukebao\controller\AiLeadController::ingest([
'companyId' => $companyId,
'nickname' => '李女士·暗黑代练',
'phone' => '13900139002',
'unionId' => 'demo_lead_002',
'planName' => '场景获客·京东群发',
'tags' => ['未添加', '暗黑3'],
'rfmLevel' => 'B',
'rfmScore' => 55,
'intention' => '比价',
'behaviorTimeline' => [
['time' => date('Y-m-d H:i', $now - 7200), 'action' => '点击广告', 'detail' => '暗黑破坏神代练'],
],
]);
\app\chukebao\controller\AiLeadController::ingest([
'companyId' => $companyId,
'nickname' => '王老板·工作室合作',
'phone' => '13700137003',
'unionId' => 'demo_lead_003',
'planName' => '场景获客·合伙人',
'tags' => ['B端', '合作'],
'rfmLevel' => 'S',
'rfmScore' => 88,
'intention' => '合作洽谈',
'behaviorTimeline' => [
['time' => date('Y-m-d H:i', $now - 600), 'action' => 'Webhook推送', 'detail' => '存客宝场景获客'],
],
]);
$count = think\Db::name('ai_lead')->where('companyId', $companyId)->count();
echo "OK companyId={$companyId} ai_lead total={$count}\n";