현대적 라이브러리 도입 완료

This commit is contained in:
2025-09-02 18:25:44 +09:00
parent 40b2328876
commit 8b495b9e80
22 changed files with 1275 additions and 1048 deletions

View File

@@ -48,6 +48,7 @@ export interface CreateCategoryData {
categoryNameEng?: string;
description?: string;
sortOrder?: number;
isActive?: string;
}
export interface CreateCodeData {
@@ -56,6 +57,7 @@ export interface CreateCodeData {
codeNameEng?: string;
description?: string;
sortOrder?: number;
isActive?: string;
}
export class CommonCodeService {
@@ -176,6 +178,8 @@ export class CommonCodeService {
updatedBy: string
) {
try {
// 디버깅: 받은 데이터 로그
logger.info(`카테고리 수정 데이터:`, { categoryCode, data });
const category = await prisma.code_category.update({
where: { category_code: categoryCode },
data: {
@@ -183,6 +187,12 @@ export class CommonCodeService {
category_name_eng: data.categoryNameEng,
description: data.description,
sort_order: data.sortOrder,
is_active:
typeof data.isActive === "boolean"
? data.isActive
? "Y"
: "N"
: data.isActive, // boolean이면 "Y"/"N"으로 변환
updated_by: updatedBy,
updated_date: new Date(),
},
@@ -256,6 +266,8 @@ export class CommonCodeService {
updatedBy: string
) {
try {
// 디버깅: 받은 데이터 로그
logger.info(`코드 수정 데이터:`, { categoryCode, codeValue, data });
const code = await prisma.code_info.update({
where: {
code_category_code_value: {
@@ -268,6 +280,12 @@ export class CommonCodeService {
code_name_eng: data.codeNameEng,
description: data.description,
sort_order: data.sortOrder,
is_active:
typeof data.isActive === "boolean"
? data.isActive
? "Y"
: "N"
: data.isActive, // boolean이면 "Y"/"N"으로 변환
updated_by: updatedBy,
updated_date: new Date(),
},