v1.0.40: 碎片处理板块调整 - 区块改名(硬数据新增与处理/软数据碎片处理)+软碎片列表时间列改updated_at(social_accounts补列迁移)+硬数据新增加全字段唯一性校验(企业名/手机/邮箱/身份证/账号ID同平台/主页链接)+格式校验(身份证/主页URL)+extra_info存储
This commit is contained in:
@@ -34,13 +34,13 @@ foreach ($tableMap as $t => $cfg) {
|
||||
}
|
||||
if ($t === 'media') {
|
||||
$rows = $pdo->query(
|
||||
"SELECT m.social_account_id AS id, sa.account_id AS name, sa.created_at AS created_at
|
||||
"SELECT m.social_account_id AS id, sa.account_id AS name, m.updated_at AS updated_at
|
||||
FROM media_commercial_attributes m
|
||||
LEFT JOIN social_accounts sa ON sa.id = m.social_account_id
|
||||
WHERE m.is_incomplete = 1"
|
||||
)->fetchAll();
|
||||
} else {
|
||||
$rows = $pdo->query("SELECT id, {$cfg['name']} AS name, created_at FROM `$t` WHERE is_incomplete = 1")->fetchAll();
|
||||
$rows = $pdo->query("SELECT id, {$cfg['name']} AS name, updated_at FROM `$t` WHERE is_incomplete = 1")->fetchAll();
|
||||
}
|
||||
foreach ($rows as $r) {
|
||||
$info = completenessInfo($pdo, $t, (int)$r['id']);
|
||||
@@ -65,17 +65,17 @@ foreach ($tableMap as $t => $cfg) {
|
||||
'optional' => $info['layers']['optional']['rate'],
|
||||
],
|
||||
'missing_fields' => array_map(function ($f) { return COMPLETENESS_LABELS[$f] ?? $f; }, $missingFields),
|
||||
'created_at' => $r['created_at'] ?? null,
|
||||
'updated_at' => $r['updated_at'] ?? null,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
// 排序:整体完整度升序(最残缺在前),同分按时间倒序
|
||||
// 排序:整体完整度升序(最残缺在前),同分按更新时间倒序
|
||||
usort($all, function ($a, $b) {
|
||||
if ($a['overall'] !== $b['overall']) {
|
||||
return $a['overall'] <=> $b['overall'];
|
||||
}
|
||||
return strcmp($b['created_at'] ?? '', $a['created_at'] ?? '');
|
||||
return strcmp($b['updated_at'] ?? '', $a['updated_at'] ?? '');
|
||||
});
|
||||
|
||||
if ($keyword !== '') {
|
||||
|
||||
Reference in New Issue
Block a user