feat: Enhance menu and screen synchronization services with new fields
- Added `menu_icon` and `screen_group_id` fields to the `Menu` interface in `menuCopyService.ts` to support additional menu attributes. - Updated the SQL insert statements in both `menuCopyService.ts` and `menuScreenSyncService.ts` to include the new fields, ensuring that menu icons and screen group IDs are properly handled during menu creation and synchronization. - These enhancements improve the flexibility and functionality of the menu management system, allowing for richer menu configurations.
This commit is contained in:
parent
3a3e4e8926
commit
d31568b1bd
|
|
@ -56,6 +56,8 @@ interface Menu {
|
|||
lang_key_desc: string | null;
|
||||
screen_code: string | null;
|
||||
menu_code: string | null;
|
||||
menu_icon: string | null;
|
||||
screen_group_id: number | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2106,26 +2108,28 @@ export class MenuCopyService {
|
|||
objid, menu_type, parent_obj_id, menu_name_kor, menu_name_eng,
|
||||
seq, menu_url, menu_desc, writer, status, system_name,
|
||||
company_code, lang_key, lang_key_desc, screen_code, menu_code,
|
||||
source_menu_objid
|
||||
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17)`,
|
||||
source_menu_objid, menu_icon, screen_group_id
|
||||
) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19)`,
|
||||
[
|
||||
newObjId,
|
||||
menu.menu_type,
|
||||
newParentObjId, // 재매핑
|
||||
newParentObjId,
|
||||
menu.menu_name_kor,
|
||||
menu.menu_name_eng,
|
||||
menu.seq,
|
||||
menu.menu_url,
|
||||
menu.menu_desc,
|
||||
userId,
|
||||
'active', // 복제된 메뉴는 항상 활성화 상태
|
||||
'active',
|
||||
menu.system_name,
|
||||
targetCompanyCode, // 새 회사 코드
|
||||
targetCompanyCode,
|
||||
menu.lang_key,
|
||||
menu.lang_key_desc,
|
||||
menu.screen_code, // 그대로 유지
|
||||
menu.screen_code,
|
||||
menu.menu_code,
|
||||
sourceMenuObjid, // 원본 메뉴 ID (최상위만)
|
||||
sourceMenuObjid,
|
||||
menu.menu_icon,
|
||||
menu.screen_group_id,
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -334,8 +334,8 @@ export async function syncScreenGroupsToMenu(
|
|||
INSERT INTO menu_info (
|
||||
objid, parent_obj_id, menu_name_kor, menu_name_eng,
|
||||
seq, menu_type, company_code, writer, regdate, status, screen_group_id, menu_desc,
|
||||
menu_url, screen_code
|
||||
) VALUES ($1, $2, $3, $4, $5, 1, $6, $7, NOW(), 'active', $8, $9, $10, $11)
|
||||
menu_url, screen_code, menu_icon
|
||||
) VALUES ($1, $2, $3, $4, $5, 1, $6, $7, NOW(), 'active', $8, $9, $10, $11, $12)
|
||||
RETURNING objid
|
||||
`;
|
||||
await client.query(insertMenuQuery, [
|
||||
|
|
@ -350,6 +350,7 @@ export async function syncScreenGroupsToMenu(
|
|||
group.description || null,
|
||||
menuUrl,
|
||||
screenCode,
|
||||
group.icon || null,
|
||||
]);
|
||||
|
||||
// screen_groups에 menu_objid 업데이트
|
||||
|
|
|
|||
6
backend/gradle/wrapper/gradle-wrapper.sync-conflict-20260205-175409-RZBZWHP.properties
vendored
Normal file
6
backend/gradle/wrapper/gradle-wrapper.sync-conflict-20260205-175409-RZBZWHP.properties
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
Loading…
Reference in New Issue