모델관리 버전 값 가져오는 로직 수정

This commit is contained in:
2025-12-18 11:34:09 +09:00
parent 121b5db316
commit 504a49d9f8

View File

@@ -1,7 +1,5 @@
package com.kamco.cd.kamcoback.postgres.repository.model;
import static com.kamco.cd.kamcoback.postgres.entity.QModelMgmtEntity.modelMgmtEntity;
import com.kamco.cd.kamcoback.model.dto.ModelMgmtDto;
import com.kamco.cd.kamcoback.postgres.QuerydslOrderUtil;
import com.kamco.cd.kamcoback.postgres.entity.ModelMgmtEntity;
@@ -12,17 +10,20 @@ import com.querydsl.core.types.dsl.BooleanExpression;
import com.querydsl.core.types.dsl.Expressions;
import com.querydsl.core.types.dsl.StringExpression;
import com.querydsl.jpa.impl.JPAQueryFactory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.support.QuerydslRepositorySupport;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.support.QuerydslRepositorySupport;
import static com.kamco.cd.kamcoback.postgres.entity.QModelMgmtEntity.modelMgmtEntity;
public class ModelMgmtRepositoryImpl extends QuerydslRepositorySupport
implements ModelMgmtRepositoryCustom {
@@ -65,7 +66,14 @@ public class ModelMgmtRepositoryImpl extends QuerydslRepositorySupport
ModelMgmtDto.ModelList.class,
Expressions.numberTemplate(
Integer.class, "row_number() over(order by {0} desc)", sortColumn),
modelMgmtEntity.modelVer,
Expressions.stringTemplate(
"concat({0}, {1}, {2}, {3}, {4})",
modelMgmtEntity.modelVer,
".",
modelMgmtEntity.hyperVer,
".",
modelMgmtEntity.epochVer)
.as("modelVer"),
modelMgmtEntity.dockerFileNm,
modelMgmtEntity.modelVer.as("modelType"),
Expressions.stringTemplate(