add task server

This commit is contained in:
xavier
2025-05-22 15:50:52 +08:00
parent 069218d64c
commit 519cc04b03
6 changed files with 1455 additions and 181 deletions

View File

@@ -62,7 +62,7 @@ class PostCreateAddFriendPlanV1Controller extends Controller
return ResponseHelper::error('标签设置格式不正确', 400);
}
// 插入数据库
// 插入数据库 customer_acquisition_task
$result = Db::name('friend_plan')->insert($data);
if ($result) {
@@ -74,4 +74,20 @@ class PostCreateAddFriendPlanV1Controller extends Controller
return ResponseHelper::error('系统错误: ' . $e->getMessage(), 500);
}
}
/**
* 验证JSON格式是否正确
*
* @param string $string
* @return bool
*/
private function validateJson($string)
{
if (empty($string)) {
return true;
}
json_decode($string);
return (json_last_error() == JSON_ERROR_NONE);
}
}