在 Parse Dashboard 的 Cloud Code 或通过 API 调用:
// 查找所有重复项目(预览)
Parse.Cloud.run('removeDuplicateProjects', { dryRun: true })
// 查找特定标题的重复项目(预览)
Parse.Cloud.run('removeDuplicateProjects', {
title: '华迈效果——21/22初稿',
dryRun: true
})
⚠️ 警告:此操作会真正删除数据,请先用预览模式确认!
// 删除特定标题的重复项目
Parse.Cloud.run('removeDuplicateProjects', {
title: '华迈效果——21/22初稿',
dryRun: false
})
// 删除所有重复项目
Parse.Cloud.run('removeDuplicateProjects', { dryRun: false })
Parse.Cloud.run('deleteProjectById', {
projectId: 'xxxxxxxxxxxx',
reason: '重复项目'
})
Parse.Cloud.run('findProjectsByTitle', {
title: '华迈效果——21/22初稿'
})
{
"success": true,
"dryRun": true,
"summary": {
"totalProjects": 150,
"duplicatesFound": 1,
"titlesWithDuplicates": 1
},
"details": [
{
"title": "华迈效果——21/22初稿",
"total": 2,
"kept": 1,
"deleted": 1,
"keptProjectId": "abc123"
}
],
"duplicates": [
{
"id": "xyz789",
"title": "华迈效果——21/22初稿",
"createdAt": "2024-01-10T10:00:00.000Z",
"stage": "订单分配",
"status": "进行中"
}
]
}
isDeleted: trueisDeleted 改回 false⚠️ 重要:
dryRun: true 预览模式isDeleted: true),不是物理删除