배치관리시스템 (DB, RestAPI)
This commit is contained in:
@@ -165,11 +165,18 @@ export class BatchService {
|
||||
from_table_name: mapping.from_table_name,
|
||||
from_column_name: mapping.from_column_name,
|
||||
from_column_type: mapping.from_column_type,
|
||||
from_api_url: mapping.from_api_url,
|
||||
from_api_key: mapping.from_api_key,
|
||||
from_api_method: mapping.from_api_method,
|
||||
to_connection_type: mapping.to_connection_type,
|
||||
to_connection_id: mapping.to_connection_id,
|
||||
to_table_name: mapping.to_table_name,
|
||||
to_column_name: mapping.to_column_name,
|
||||
to_column_type: mapping.to_column_type,
|
||||
to_api_url: mapping.to_api_url,
|
||||
to_api_key: mapping.to_api_key,
|
||||
to_api_method: mapping.to_api_method,
|
||||
to_api_body: mapping.to_api_body, // Request Body 템플릿 추가
|
||||
mapping_order: mapping.mapping_order || index + 1,
|
||||
created_by: userId,
|
||||
},
|
||||
@@ -311,12 +318,14 @@ export class BatchService {
|
||||
};
|
||||
}
|
||||
|
||||
await prisma.batch_configs.update({
|
||||
where: { id },
|
||||
data: {
|
||||
is_active: "N",
|
||||
updated_by: userId,
|
||||
},
|
||||
// 배치 매핑 먼저 삭제 (외래키 제약)
|
||||
await prisma.batch_mappings.deleteMany({
|
||||
where: { batch_config_id: id }
|
||||
});
|
||||
|
||||
// 배치 설정 삭제
|
||||
await prisma.batch_configs.delete({
|
||||
where: { id }
|
||||
});
|
||||
|
||||
return {
|
||||
@@ -730,6 +739,7 @@ export class BatchService {
|
||||
return { successCount: 0, failedCount: data.length };
|
||||
}
|
||||
} else {
|
||||
console.log(`[BatchService] 연결 정보 디버그:`, { connectionType, connectionId });
|
||||
throw new Error(`잘못된 연결 타입 또는 연결 ID: ${connectionType}, ${connectionId}`);
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user