Merge pull request '하이퍼 파라미터 최적값 조회 수정' (#20) from feat/training_260202 into develop

Reviewed-on: #20
This commit was merged in pull request #20.
This commit is contained in:
2026-02-05 15:22:56 +09:00
3 changed files with 22 additions and 4 deletions

View File

@@ -137,10 +137,10 @@ public class HyperParamCoreService {
* @return
*/
public HyperParamDto.Basic getInitHyperParam() {
ModelHyperParamEntity entity = new ModelHyperParamEntity();
entity.setUuid(null);
entity.setHyperVer(null);
entity.setCreatedDttm(null);
ModelHyperParamEntity entity =
hyperParamRepository
.findHyperParamByHyperVer("HPs_0001")
.orElseThrow(() -> new CustomApiException("NOT_FOUND_DATA", HttpStatus.NOT_FOUND));
return entity.toDto();
}

View File

@@ -15,6 +15,8 @@ public interface HyperParamRepositoryCustom {
*/
Optional<ModelHyperParamEntity> findHyperParamVer();
Optional<ModelHyperParamEntity> findHyperParamByHyperVer(String hyperVer);
Optional<ModelHyperParamEntity> findHyperParamByUuid(UUID uuid);
Page<HyperParamDto.List> findByHyperVerList(HyperParamDto.SearchReq req);

View File

@@ -41,6 +41,22 @@ public class HyperParamRepositoryImpl implements HyperParamRepositoryCustom {
.fetchOne());
}
@Override
public Optional<ModelHyperParamEntity> findHyperParamByHyperVer(String hyperVer) {
return Optional.ofNullable(
queryFactory
.select(modelHyperParamEntity)
.from(modelHyperParamEntity)
.where(
modelHyperParamEntity
.delYn
.isFalse()
.and(modelHyperParamEntity.hyperVer.eq(hyperVer)))
.limit(1)
.fetchOne());
}
@Override
public Optional<ModelHyperParamEntity> findHyperParamByUuid(UUID uuid) {
return Optional.ofNullable(