v1.0.19: 修复人员编辑入口缺失(person.js addPerson/editPerson) + 渠道明细数量字段名(analysis.php cnt) + CDP全量验证43项PASS

This commit is contained in:
nanguaboss
2026-08-08 19:29:14 +08:00
parent 2cb688ed46
commit 1c8b374a72
40 changed files with 2313 additions and 658 deletions
+27
View File
@@ -0,0 +1,27 @@
<?php
/**
* 渠道新增计划删除接口 POST /api/channel/plan_delete.php
* 入参:id(必填);软删除(is_active = 0)
*/
require_once __DIR__ . '/../common/db.php';
require_once __DIR__ . '/../common/response.php';
require_once __DIR__ . '/../common/auth.php';
require_once __DIR__ . '/../common/logger.php';
checkAjax();
checkPermission('channel');
$id = (int)($_POST['id'] ?? 0);
if ($id <= 0) {
Response::error('参数错误', 400);
}
$pdo = DB::getInstance()->getPdo();
$stmt = $pdo->prepare("UPDATE channel_plans SET is_active = 0 WHERE id = ?");
$stmt->execute([$id]);
if ($stmt->rowCount() === 0) {
Response::error('计划不存在');
}
logCurrent('delete', 'channel_plan', 'channel_plans', $id, ['soft_delete' => true]);
Response::success(null, '删除成功');