영상관리 리스트 조회 커밋
This commit is contained in:
@@ -61,21 +61,19 @@ public class MapSheetMngDto {
|
||||
@AllArgsConstructor
|
||||
public static class MngDto{
|
||||
private int rowNum;
|
||||
/*
|
||||
private int mngYyyy;
|
||||
private MngState mngState;
|
||||
private SyncState syncState;
|
||||
private String mngState;
|
||||
private String syncState;
|
||||
private String mngStateDttm;
|
||||
private String syncStateDttm;
|
||||
private Integer sheetCnt;
|
||||
private Integer exceptCnt;
|
||||
//private int sheetCnt;
|
||||
//private int exceptCnt;
|
||||
private String mngPath;
|
||||
private String createdDttm;
|
||||
private Long createdUid;
|
||||
private String updatedDttm;
|
||||
private Long updatedUid;
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
@Getter
|
||||
|
||||
@@ -94,41 +94,36 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
.select(
|
||||
Projections.constructor(
|
||||
MapSheetMngDto.MngDto.class,
|
||||
Expressions.numberTemplate(Integer.class, "row_number() over(order by {0} desc)", mapSheetMngEntity.createdDttm)
|
||||
/*
|
||||
Expressions.numberTemplate(Integer.class, "row_number() over(order by {0} desc)", mapSheetMngEntity.createdDttm),
|
||||
mapSheetMngEntity.id,
|
||||
mapSheetMngEntity.mngState,
|
||||
mapSheetMngEntity.syncState,
|
||||
Expressions.stringTemplate("to_char({0}, 'YYYY-MM-DD HH24:MI:SS')", mapSheetMngEntity.mngStateDttm),
|
||||
Expressions.stringTemplate("to_char({0}, 'YYYY-MM-DD HH24:MI:SS')", mapSheetMngEntity.syncStateDttm),
|
||||
10,
|
||||
20,
|
||||
(Expression<?>) mapSheetMngEntity.mngPath,
|
||||
mapSheetMngEntity.mngPath,
|
||||
Expressions.stringTemplate("to_char({0}, 'YYYY-MM-DD HH24:MI:SS')", mapSheetMngEntity.createdDttm),
|
||||
mapSheetMngEntity.createdUid,
|
||||
Expressions.stringTemplate("to_char({0}, 'YYYY-MM-DD HH24:MI:SS')", mapSheetMngEntity.updatedDttm),
|
||||
mapSheetMngEntity.updatedUid
|
||||
|
||||
*/
|
||||
)
|
||||
)
|
||||
.from(mapSheetMngEntity)
|
||||
.where(
|
||||
mapSheetMngEntity.id.eq(searchReq.getMngYyyy()),
|
||||
mapSheetErrorSearchValue(searchReq)
|
||||
)
|
||||
.offset(pageable.getOffset())
|
||||
.limit(pageable.getPageSize())
|
||||
.orderBy(mapSheetMngEntity.createdDttm.desc())
|
||||
//.where(
|
||||
// mapSheetMngSearchValue(searchReq)
|
||||
//)
|
||||
//.offset(pageable.getOffset())
|
||||
//.limit(pageable.getPageSize())
|
||||
//.orderBy(mapSheetMngEntity.id.desc())
|
||||
.fetch();
|
||||
|
||||
Long countQuery = queryFactory
|
||||
.select(mapSheetMngEntity.id.count())
|
||||
.from(mapSheetMngEntity)
|
||||
.where(
|
||||
mapSheetMngEntity.id.eq(searchReq.getMngYyyy()),
|
||||
mapSheetErrorSearchValue(searchReq)
|
||||
)
|
||||
//.where(
|
||||
// mapSheetMngEntity.id.eq(searchReq.getMngYyyy()),
|
||||
// mapSheetMngSearchValue(searchReq)
|
||||
//)
|
||||
.fetchOne();
|
||||
|
||||
return new PageImpl<>(foundContent, pageable, countQuery);
|
||||
@@ -154,11 +149,11 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
}
|
||||
|
||||
private BooleanExpression mapSheetMngSearchValue(MapSheetMngDto.searchReq searchReq) {
|
||||
if (Objects.isNull(searchReq.getSearchValue())) {
|
||||
if (Objects.isNull(searchReq.getMngYyyy())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 검색어 1개 값이 도엽명 or 도엽번호 like 검색
|
||||
return Expressions.booleanTemplate("{0} = " + searchReq.getSearchValue() , mapSheetMngEntity.id);
|
||||
return Expressions.booleanTemplate("{0} = " + searchReq.getMngYyyy() , mapSheetMngEntity.id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user