|
@@ -29,7 +29,7 @@ router.get("/", async (req, res) => {
|
|
|
const sql = `
|
|
|
SELECT access_task_id, search_task_id, tools_name, tools_function_name,
|
|
|
access_type, tools_function_desc, api_doc, api_class_name, api_provider,
|
|
|
- operate_path_data, origin_content_link, status, fail_reason,
|
|
|
+ operate_path_data, origin_content_link, website_location, status, fail_reason,
|
|
|
create_time, update_time
|
|
|
FROM tools_auto_access_task
|
|
|
${whereClause}
|
|
@@ -64,7 +64,7 @@ router.get("/:id", async (req, res) => {
|
|
|
const sql = `
|
|
|
SELECT access_task_id, search_task_id, tools_name, tools_function_name,
|
|
|
access_type, tools_function_desc, api_doc, api_class_name, api_provider,
|
|
|
- operate_path_data, origin_content_link, status, fail_reason,
|
|
|
+ operate_path_data, origin_content_link, website_location, status, fail_reason,
|
|
|
create_time, update_time
|
|
|
FROM tools_auto_access_task
|
|
|
WHERE access_task_id = ?
|
|
@@ -97,6 +97,7 @@ router.put("/:id", async (req, res) => {
|
|
|
api_provider,
|
|
|
operate_path_data,
|
|
|
origin_content_link,
|
|
|
+ website_location,
|
|
|
status,
|
|
|
fail_reason,
|
|
|
} = req.body;
|
|
@@ -106,7 +107,7 @@ router.put("/:id", async (req, res) => {
|
|
|
SET search_task_id = ?, tools_name = ?, tools_function_name = ?,
|
|
|
access_type = ?, tools_function_desc = ?, api_doc = ?,
|
|
|
api_class_name = ?, api_provider = ?, operate_path_data = ?, origin_content_link = ?,
|
|
|
- status = ?, fail_reason = ?, update_time = NOW()
|
|
|
+ website_location = ?, status = ?, fail_reason = ?, update_time = NOW()
|
|
|
WHERE access_task_id = ?
|
|
|
`;
|
|
|
|
|
@@ -121,6 +122,7 @@ router.put("/:id", async (req, res) => {
|
|
|
api_provider ?? null,
|
|
|
operate_path_data ?? null,
|
|
|
origin_content_link ?? null,
|
|
|
+ website_location ?? null,
|
|
|
status ?? null,
|
|
|
fail_reason ?? null,
|
|
|
id,
|
|
@@ -144,6 +146,7 @@ router.post("/", async (req, res) => {
|
|
|
api_provider,
|
|
|
api_doc,
|
|
|
operate_path_data,
|
|
|
+ website_location,
|
|
|
} = req.body;
|
|
|
|
|
|
// 验证必填字段
|
|
@@ -167,9 +170,9 @@ router.post("/", async (req, res) => {
|
|
|
const sql = `
|
|
|
INSERT INTO tools_auto_access_task (
|
|
|
access_task_id, tools_name, tools_function_name, tools_function_desc,
|
|
|
- access_type, api_provider, api_doc, operate_path_data,
|
|
|
+ access_type, api_provider, api_doc, operate_path_data, website_location,
|
|
|
create_time, update_time
|
|
|
- ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, NOW(), NOW())
|
|
|
+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NOW(), NOW())
|
|
|
`;
|
|
|
|
|
|
// 保证 operate_path_data 为字符串(可能传入对象)
|
|
@@ -185,6 +188,7 @@ router.post("/", async (req, res) => {
|
|
|
api_provider || null,
|
|
|
api_doc || null,
|
|
|
operatePathValue || null,
|
|
|
+ website_location || null,
|
|
|
]);
|
|
|
|
|
|
res.status(201).json({
|