소스필드 못찾는 버그 수정
This commit is contained in:
@@ -1646,7 +1646,18 @@ export class NodeFlowExecutionService {
|
||||
// WHERE 조건 생성
|
||||
const whereClauses: string[] = [];
|
||||
whereConditions?.forEach((condition: any) => {
|
||||
const condValue = data[condition.field];
|
||||
// 🔥 수정: sourceField가 있으면 소스 데이터에서 값을 가져옴
|
||||
let condValue: any;
|
||||
if (condition.sourceField) {
|
||||
condValue = data[condition.sourceField];
|
||||
} else if (
|
||||
condition.staticValue !== undefined &&
|
||||
condition.staticValue !== ""
|
||||
) {
|
||||
condValue = condition.staticValue;
|
||||
} else {
|
||||
condValue = data[condition.field];
|
||||
}
|
||||
|
||||
if (condition.operator === "IS NULL") {
|
||||
whereClauses.push(`${condition.field} IS NULL`);
|
||||
@@ -1987,7 +1998,18 @@ export class NodeFlowExecutionService {
|
||||
|
||||
// WHERE 조건 생성
|
||||
whereConditions?.forEach((condition: any) => {
|
||||
const condValue = data[condition.field];
|
||||
// 🔥 수정: sourceField가 있으면 소스 데이터에서 값을 가져옴
|
||||
let condValue: any;
|
||||
if (condition.sourceField) {
|
||||
condValue = data[condition.sourceField];
|
||||
} else if (
|
||||
condition.staticValue !== undefined &&
|
||||
condition.staticValue !== ""
|
||||
) {
|
||||
condValue = condition.staticValue;
|
||||
} else {
|
||||
condValue = data[condition.field];
|
||||
}
|
||||
|
||||
if (condition.operator === "IS NULL") {
|
||||
whereClauses.push(`${condition.field} IS NULL`);
|
||||
@@ -2889,7 +2911,26 @@ export class NodeFlowExecutionService {
|
||||
|
||||
const values: any[] = [];
|
||||
const clauses = conditions.map((condition, index) => {
|
||||
const value = data ? data[condition.field] : condition.value;
|
||||
// 🔥 수정: sourceField가 있으면 소스 데이터에서 값을 가져오고,
|
||||
// 없으면 staticValue 또는 기존 field 사용
|
||||
let value: any;
|
||||
if (data) {
|
||||
if (condition.sourceField) {
|
||||
// sourceField가 있으면 소스 데이터에서 해당 필드의 값을 가져옴
|
||||
value = data[condition.sourceField];
|
||||
} else if (
|
||||
condition.staticValue !== undefined &&
|
||||
condition.staticValue !== ""
|
||||
) {
|
||||
// staticValue가 있으면 사용
|
||||
value = condition.staticValue;
|
||||
} else {
|
||||
// 둘 다 없으면 기존 방식 (field로 값 조회)
|
||||
value = data[condition.field];
|
||||
}
|
||||
} else {
|
||||
value = condition.value;
|
||||
}
|
||||
values.push(value);
|
||||
|
||||
// 연산자를 SQL 문법으로 변환
|
||||
|
||||
Reference in New Issue
Block a user