다국어 키 자동생성 로직
This commit is contained in:
@@ -696,6 +696,21 @@ export class MultiLangService {
|
||||
values.push(params.menuCode);
|
||||
}
|
||||
|
||||
// 카테고리 필터 (하위 카테고리 포함)
|
||||
if (params.categoryId) {
|
||||
whereConditions.push(`category_id IN (
|
||||
WITH RECURSIVE category_tree AS (
|
||||
SELECT category_id FROM multi_lang_category WHERE category_id = $${paramIndex}
|
||||
UNION ALL
|
||||
SELECT c.category_id FROM multi_lang_category c
|
||||
INNER JOIN category_tree ct ON c.parent_id = ct.category_id
|
||||
)
|
||||
SELECT category_id FROM category_tree
|
||||
)`);
|
||||
values.push(params.categoryId);
|
||||
paramIndex++;
|
||||
}
|
||||
|
||||
// 검색 조건 (OR)
|
||||
if (params.searchText) {
|
||||
whereConditions.push(
|
||||
@@ -717,12 +732,13 @@ export class MultiLangService {
|
||||
lang_key: string;
|
||||
description: string | null;
|
||||
is_active: string | null;
|
||||
category_id: number | null;
|
||||
created_date: Date | null;
|
||||
created_by: string | null;
|
||||
updated_date: Date | null;
|
||||
updated_by: string | null;
|
||||
}>(
|
||||
`SELECT key_id, company_code, usage_note, lang_key, description, is_active,
|
||||
`SELECT key_id, company_code, usage_note, lang_key, description, is_active, category_id,
|
||||
created_date, created_by, updated_date, updated_by
|
||||
FROM multi_lang_key_master
|
||||
${whereClause}
|
||||
@@ -737,6 +753,7 @@ export class MultiLangService {
|
||||
langKey: key.lang_key,
|
||||
description: key.description || undefined,
|
||||
isActive: key.is_active || "Y",
|
||||
categoryId: key.category_id || undefined,
|
||||
createdDate: key.created_date || undefined,
|
||||
createdBy: key.created_by || undefined,
|
||||
updatedDate: key.updated_date || undefined,
|
||||
|
||||
Reference in New Issue
Block a user