Merge branch 'main' of http://39.117.244.52:3000/kjs/ERP-node into feature/screen-management
This commit is contained in:
@@ -3800,6 +3800,15 @@ export class TableManagementService {
|
||||
const cacheableJoins: EntityJoinConfig[] = [];
|
||||
const dbJoins: EntityJoinConfig[] = [];
|
||||
|
||||
// 🔒 멀티테넌시: 회사별 데이터 테이블은 캐시 사용 불가 (company_code 필터링 필요)
|
||||
const companySpecificTables = [
|
||||
"supplier_mng",
|
||||
"customer_mng",
|
||||
"item_info",
|
||||
"dept_info",
|
||||
// 필요시 추가
|
||||
];
|
||||
|
||||
for (const config of joinConfigs) {
|
||||
// table_column_category_values는 특수 조인 조건이 필요하므로 항상 DB 조인
|
||||
if (config.referenceTable === "table_column_category_values") {
|
||||
@@ -3808,6 +3817,13 @@ export class TableManagementService {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 🔒 회사별 데이터 테이블은 캐시 사용 불가 (멀티테넌시)
|
||||
if (companySpecificTables.includes(config.referenceTable)) {
|
||||
dbJoins.push(config);
|
||||
console.log(`🔗 DB 조인 (멀티테넌시): ${config.referenceTable}`);
|
||||
continue;
|
||||
}
|
||||
|
||||
// 캐시 가능성 확인
|
||||
const cachedData = await referenceCacheService.getCachedReference(
|
||||
config.referenceTable,
|
||||
|
||||
Reference in New Issue
Block a user