Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
@RequiredArgsConstructor
public enum LogStatus {
LOGIN("로그인"),
LOGOUT("로그아웃"),
REQUEST_CREATED("요청 생성"),
REQUEST_UPDATED("요청 수정"),
REQUEST_CANCELLED("요청 취소"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public Page<AnonymousLogEntity> filterAnonymousLogs(FilterLogRequest request, Pa
builder.and(anonymousLogEntity.loginNickname.contains(request.nickName()));
}
if (!request.clientIp().isEmpty()) {
builder.and(anonymousLogEntity.clientIp.contains(request.clientIp()));
builder.and(anonymousLogEntity.clientIp.startsWith(request.clientIp()));
}
OrderSpecifier<LocalDateTime> orderSpecifier = sortDirection.equalsIgnoreCase("ASC")
? anonymousLogEntity.requestAt.asc()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Page<MemberLogEntity> filterMemberLogs(FilterLogRequest request, Pageable
builder.and(memberEntity.nickname.contains(request.nickName()));
}
if (!request.clientIp().isEmpty()) {
builder.and(memberLogEntity.clientIp.contains(request.clientIp()));
builder.and(memberLogEntity.clientIp.startsWith(request.clientIp()));
}
OrderSpecifier<LocalDateTime> orderSpecifier = sortDirection.equalsIgnoreCase("ASC")
? memberLogEntity.requestAt.asc()
Expand All @@ -56,6 +56,7 @@ public Page<MemberLogEntity> filterMemberLogs(FilterLogRequest request, Pageable
.fetch();
long total = queryFactory
.selectFrom(memberLogEntity)
.leftJoin(memberLogEntity.member, memberEntity)
.where(builder)
.fetch().size();
return new PageImpl<>(result, pageable, total);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ALTER TABLE api_log
MODIFY COLUMN log_status ENUM('LOGIN', 'REQUEST_CREATED', 'REQUEST_UPDATED', 'REQUEST_CANCELLED',
'REQUEST_APPROVED', 'ASSIGNER_CHANGED', 'COMMENT_ADDED',
'COMMENT_UPDATED', 'STATUS_CHANGED', 'TASK_VIEWED') NOT NULL;