Merge pull request '추론결과 demo URL 제거, 공통코드 fetchJoin 빼기' (#45) from feat/dev_251201 into develop

Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/45
This commit is contained in:
2025-12-11 14:40:26 +09:00
2 changed files with 5 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@Tag(name = "추론관리 분석결과", description = "추론관리 분석결과") @Tag(name = "추론관리 분석결과", description = "추론관리 분석결과")
@RequestMapping({"/demo/inf/res", "/api/inf/res"}) @RequestMapping({"/api/inf/res"})
@RequiredArgsConstructor @RequiredArgsConstructor
@RestController @RestController
public class InferenceResultApiController { public class InferenceResultApiController {

View File

@@ -25,11 +25,10 @@ public class CommonCodeRepositoryImpl implements CommonCodeRepositoryCustom {
queryFactory queryFactory
.selectFrom(commonCodeEntity) .selectFrom(commonCodeEntity)
.leftJoin(commonCodeEntity.children, child) .leftJoin(commonCodeEntity.children, child)
.fetchJoin() .on(child.deleted.isFalse().or(child.deleted.isNull()))
.where( .where(
commonCodeEntity.id.eq(id), commonCodeEntity.id.eq(id),
commonCodeEntity.deleted.isFalse().or(commonCodeEntity.deleted.isNull()), commonCodeEntity.deleted.isFalse().or(commonCodeEntity.deleted.isNull()))
child.deleted.isFalse().or(child.deleted.isNull()))
.orderBy(commonCodeEntity.order.asc(), child.order.asc()) .orderBy(commonCodeEntity.order.asc(), child.order.asc())
.fetchOne()); .fetchOne());
} }
@@ -41,13 +40,12 @@ public class CommonCodeRepositoryImpl implements CommonCodeRepositoryCustom {
queryFactory queryFactory
.selectFrom(commonCodeEntity) .selectFrom(commonCodeEntity)
.leftJoin(commonCodeEntity.children, child) .leftJoin(commonCodeEntity.children, child)
.fetchJoin() .on(child.deleted.isFalse().or(child.deleted.isNull()))
.where( .where(
commonCodeEntity.parent.isNull(), commonCodeEntity.parent.isNull(),
commonCodeEntity.code.eq(code), commonCodeEntity.code.eq(code),
commonCodeEntity.used.isTrue(), commonCodeEntity.used.isTrue(),
commonCodeEntity.deleted.isFalse().or(commonCodeEntity.deleted.isNull()), commonCodeEntity.deleted.isFalse().or(commonCodeEntity.deleted.isNull()))
child.deleted.isFalse().or(child.deleted.isNull()))
.orderBy(child.order.asc()) .orderBy(child.order.asc())
.fetchOne()); .fetchOne());
} }