编辑功能提交

This commit is contained in:
wong
2025-06-17 15:56:02 +08:00
parent 51beeee212
commit ca0e7e8bc0
12 changed files with 321 additions and 120 deletions

View File

@@ -61,7 +61,7 @@ class PostCreateAddFriendPlanV1Controller extends Controller
$params = $this->request->param();
// 验证必填字段
if (empty($params['planName'])) {
if (empty($params['name'])) {
return ResponseHelper::error('计划名称不能为空', 400);
}
@@ -91,8 +91,8 @@ class PostCreateAddFriendPlanV1Controller extends Controller
// 其余参数归为sceneConf
$sceneConf = $params;
unset(
$sceneConf['planName'],
$sceneConf['scenario'],
$sceneConf['name'],
$sceneConf['sceneId'],
$sceneConf['messagePlans'],
$sceneConf['scenarioTags'],
$sceneConf['customTags'],
@@ -106,8 +106,8 @@ class PostCreateAddFriendPlanV1Controller extends Controller
// 构建数据
$data = [
'name' => $params['planName'],
'sceneId' => $params['scenario'],
'name' => $params['name'],
'sceneId' => $params['sceneId'],
'sceneConf' => json_encode($sceneConf, JSON_UNESCAPED_UNICODE),
'reqConf' => json_encode($reqConf, JSON_UNESCAPED_UNICODE),
'msgConf' => json_encode($msgConf, JSON_UNESCAPED_UNICODE),