Skip to content

Commit

Permalink
[release] 로깅 관련 세팅 운영 서버 배포 (#172)
Browse files Browse the repository at this point in the history
* [test] #98 게시글 리스트 조회 공지사항 테스트 코드 작성

* [hotfix] 대댓글 수정시 lastEditedAt 반환 안되는 문제 해결

* [hotfix] Member 복수 반환 문제 임시 해결 -> 게시물 좋아요에 영향

* [feat] 프론트 url corsconfig 추가

* [fix] 프론트 url corsconfig 수정

* [refactor] 중앙운영위원회 댓글 생성 시 답변완료로 바뀌는 로직 수정

* [feat] : fromEnumOrNull 메소드 통해 한글값 반환 처리

* [feat] : Mapper에서 fromEnumOrNull 사용

* [refactor] 게시물 생성 시 groupCode 받는 것으로 수정

- group이 같은 멤버가 2개 이상 존재할 수 있기에 직접적으로 groupCode를 받는 것으로 수정

* [fix] : Member List 반화느로 자치기구 로그인 수정

* [refactor] 스케줄러 5분으로 수정 -> 테스트 목적

* [refactor] 대댓글 조회 시 최신순 정렬 X

* [refactor] 게시물 생성시 공지사항 게시판도 categoryCode에 카테고리 넣는 것으로 다시 수정

* [refactor] 청원상태 로직 자잘한 오타 수정

* [refactor] 게시물 삭제 시 s3에 있는 파일도 모두 삭제하기 위한 request dto 추가

* [hotfix] : 게시물 수정 api dto에 새로 넣은 파일 게시물과 연동

* [hotfix] 빌드 문제 해결

* [feat, fix] : CouncilSignInRequest에 councilName, groupIdList 추가

* [feat] : groupIdList로 List<Group> 찾기 추가

* [feat] : 학생자치기구 로그인 로직 수정 및 추가

* [del, feat] : 필요없는 의존성 삭제, List<Group>찾기

* [refactor] 자치기구 로그인 반환값 majorCode 추가

* [chore] content longtext로 설정

* [fix] 자료집 조회 dto 수정

* [fix] 자료집 조회 dto 수정

* [hotfix] 페이지 쿼리dsl 로직 수정

* [refactor] 게시물 Status NEW -> GENERAL 상태 변경 스케줄러 추가

* [refactor] 자료집 게시판 검색 api 별도 추가

* [refactor] 자료집 게시판 검색 api uri 수정

* [refactor] 자료집 게시판 검색 api test

* [feat] cors vercel url 추가

* feat acl test

* [hotfix] 공지사항 게시물 수정시 category null 처리

* [chore] 불필요한 주석 삭제

* [hotfix] 공지시항 게시물 null 처리 해결

* [hotfix] 청원게시판 인기청원 진행중일때 조건 수정

* [refactor] #110 불필요한 로직 및 클래스 삭제

* [refactor] #110 PostAcl Entity 수정

    TargetGroup은 자치기구의 권한을 체크하기 위함
    Target은 User, EveryOne, AnonyMous를 처리하기 위함

* [refactor] #110 불필요한 파일 주석

* [feat] #110 AOP 사용 선언

* [feat] #110 AOP를 사용한 사용자, 자치기구별 권한처리 로직 구현 완료

    - 게시물 전체 조회 시 글쓰기, 단건조회 권한 노출
    - 게시물 단건 조회 시 삭제, 댓글, 댓글 삭제 등 권한 노출

* [feat] #110 검색 api도 AOP 사용하여 권한 반환

* [refactor] #110 불필요한 주석 삭제

* [refactor] #110 권한처리 공통로직 메소드 핸들러로 분리

* [refactor] #110 게시물생성 swagger description 수정

* [feat] CorsConfig 학교 도메인 추가

* [feat] SwaggerConfig 학교 도메인 추가

* [refactor] 게시물 단건 조회 시 파일,이미지 상세 내용 반환

    - 파일 url 뿐만 아니라 파일명까지 반환

* [fix] #110 PetitionPostProcessorTest 주석

* [fix] #110 메소드 변수 순서 수정

* [refactor] #110 비로그인,로그인 모두 토큰으로 구분하게 변환

* [refactor] #110 불필요한 주석 삭제

* [refactor] bothWhiteList 수정

* [hotfix] 검색 권한 검사 변수 재할당 오류 해결

* [refactor] canAuthority 대댓글 반환 값에도 포함

* [refactor] corsConfig 수정 및 인기청원게시물 좋아요 1개 이상인 것만 조회하게 수정

* [hotfix] 게시물 삭제 시 파일(이미지) 없을때 삭제 안되는 문제 해결

* [refactor] #118 청원상태 스케줄러 매일 정오에 실행되게 수정

* [hotfix] #118 권한 필드명 통일 및 게시물의 댓글 존재하지 않을 때도 권한 반환하기 위하여 권한 필드 depth 이동

* [hotfix] update로직 수정

* [hotfix] 짜잘한 코드 수정

* [hotfix] 공지사항 게시물 수정 시 isNotice false일 때 status 상태 반영은 안되는 문제해결

* 긴급공지였던 게시물을 수정시 isNotice를 false로 넣어서 요청한다면 상태를 GENERAL(일반)으로 변경하게 수정

* [refactor] 서버 도메인 변경

* [add] #123 @JobScope

* [fix] #123 csv entity 필드 변경

* [fix] #123 csv domain 필드 변경

* [fix] #123 csv mapper 필드 변경

* [fix] #123 csvReader 필드 변경

* [fix] #123 csvWriter 필드 변경

* [fix] #123 controller part로 변경

* [fix] #123 AdminController consume설정

* [fix] #123 filepath 수정

* [hotfix]: 긴급 공지 상태 변경

* [chore] #127 actuator 의존성 추가

* [feat] #127 actuator 경로 White list 추가

* [hotfix] groupEntity와 memberEntity 간 조인 조건 명확히 하여 groupCode 관련 경로 표현식 오류 해결

* [fix] #123 getProgram으로 수정

* [fix] #123 JobScope추가

* [fix] #123 getMajor로 다시 수정ㅇ

* [hotfix]: 자료집 수정 api 추가

* [hotfix]: 자료집 수정 api 추가

* [hotfix]: 자료집 수정 url 수정

* [hotfix]: 자료집 수정 api 리팩토링

* [hotfix]: 자료집 수정 api 리팩토링

* [hotfix]: 자료집 수정 api 리팩토링

* [hotfix]: 자료집 수정 api 리팩토링

* [hotfix]: 자료집 수정 api 리팩토링

* [chore] #131 board 디비수정

* [hotfix]: 자료집 수정 카테고리

* [hotfix]: 자료집 수정 카테고리

* [hotfix]: 자료집 수정 카테고리

* [hotfix]: 자료집 categort 학부들 추가

* [feat] CORS 학교 도메인 연결!!!

* [refactor] 공지사항 게시물 정렬 시 1)긴급공지 2)NEW 3)일반 순으로 최종 재정렬되게 수정

* [refactor] 공지사항 게시물 정렬 시 1)긴급공지 2)NEW 3)일반 순으로 최종 재정렬되게 수정 - 검색도 적용

* [refactor] GroupCode에 CLUB_UNION(동아리연합회) 추가

- 동아리연합회는 멤버에 속하지만 동아리 연합회는 예외적으로 ACL적용을 해야하기 때문에 그룹코드에 추가해야함

- 그래서 동아리 연합회를 그룹코드에 추가하면 코드의 수정이 많지 않을 것이라고 예상(노션 업데이트)

* [refactor] ACL TargetGroup에 CLUB_UNION(동아리연합회) 추가

* [hotfix] 게시물 전체 조회 페이지네이션 오류 해결

distinct 추가해서 중복 객체 카운팅 해결

* [refactor] fetchCount -> fetchOne으로 수정

fetchCount는 최신 버전 deprecated

* [add] UserInfoResponse 추가(passu)

* [add] TokenRequest 추가(passu)

* [add] 토큰 유저 정보 조회 로직

* [add] 유저 찾기 로직

* [add] SecurityConfig 경로 추가

* [fix] record to class

* [hotfix] 페이징 중복 문제 해결, countDistinct

* [hotfix] 페이징 중복 문제 해결, countDistinct

* findAllByBoardIdAndGroupCodeAndMemberCode 메소드는 현재 프론트에서 쓰지 않는 메소드이기는 하지만, 함께 수정함(같은 로직이기 때문에)

* [refactor] 분실물 게시물 단건 조회 시 학생의 학번도 반환 추가

* [fix] @responsebody 삭제

* [fix] Header로 토큰 발급받는 것으로 수정

* [fix] required false설정

* [add] UserInfoResponse of 메소드 추가

* [fix] 우선 간편하게 하나만 찾아서 보내주는 것으로 수정

* [fix] studentId 출력 부분 수정

* [chore] #139 rename 및 타겟 브랜치 메인으로 변경

* [chore] #139 develop 브랜치 cicd

* [fix] #139 잘못 기입된 시크릿명 수정

* [refactor] : 게시물 생성 dto 공통 추상클래스로 만들기

* [refactor] #139 현재 브랜치 배포 대상 제외

* [refactor] : 팩토리로 게시판별 게시물 처리

* [feat]:인권신고게시판 추가 엔티티 생성

* [refactor]:배포 문제해결

* [feat]:#142 CustomReqeustBody, 게시물 delete 수정

* [fix]:#142 swagger 연결 서버 도메인 변경

* [fix]:#142 게시물 생성 description변경

* [feat] 건의게시판 답변대기 카테고리 추가

* [fix]: #142 전화번호 필드 추가

* [feat] 건의게시판 조회

* [feat] 건의게시판 단건조회

* [feat]: #142 인권신고게시판 조회 ACL 적용

* [feat]:#142 인권신고게시판 단건조회

* [feat]:#142 인권신고게시판 글쓰기 ACL추가

* Revert "[feat]:#142 인권신고게시판 단건조회"

This reverts commit 3d643bc.

* [fix]:#142 파일추가

* [feat]: 인권신고게시판 공식답변 처리

* [fix]: swagger description 수정

* Revert "Revert "[feat]:#142 인권신고게시판 단건조회""

This reverts commit 5218dd2.

* [fix] 예술창작학부에 속한 문예창작전공, 영화예술전공 예외처리 코드

* [fix] 예술창작학부에 속한 문예창작전공, 영화예술전공 예외처리 코드

* [feat] 건의게시판 자치기구 댓글 시 CommentType OFFICIAL로 내려가게 수정

* [feat]:#142 오피셜댓글-> 카테고리 상태변경

* [feat] : #142 에러수정

* [feat] #142 findSuggestionCommitteeMember 널처리

* [feat] #142 SuggestionPostDetailResponse 에 officialCommentList 추가

* [feat] #142 여백 제거

* [fix]:#142 personType 한글로 수정

* [fix]:#142 category, isAuthor, rightsDetailList 필드명 맞추기

* [fix]:#142 postFileList 필드명 변경

* [feat] #142 건의게시판 userId 추가

* [feat]:#142 건의대상 타입 필드 추가

* [feat] #142 suggestionTarget 널처리

* [feat] #142 suggestionTarget 널처리

* [feat] #142 건의게시판 조회

* [fix]:#142 단건조회 category 필드명 수정

* [fix] :#142 SuggestionTarget null 이슈 해결

* [fix] : #142 인권신고게시물생성 category 상수화

* Revert "[fix] : #142 인권신고게시물생성 category 상수화"

This reverts commit 995fdea.

* [feat] : #142 인권신고게시물 패치 API 생성

* [feat] : #142 인권게시판 일반로그인 유저 리스트조회 수정

* [feat] : #142 건의게시판 일반로그인 유저 리스트조회 수정

* [feat]:#142 페이지 정보처리

* [feat]:#142 페이지 정보처리2

* [fix]:#142 인권신고 게시판 일반 유저 ACL추가

* [fix]:#142 카테고리 상수화

* [feat]:#142 인권신고게시판 patch 수정

* [feat]:#142 board-8 patch시 에러처리

* [feat] 프론트 도메인 추가

* [fix]:비로그인 처리

* [fix]:category 필드 다중매핑

* [feat]:비로그인 목록조회 처리

* [refactor] : #142 목록조회 엔드포인트 변경 및 리팩토링

* [feat]:#142 rightsDetail patch 방식 수정

* [fix] : #142 swagger 스키마

* [refactor]: #152 개발 도메인 CORS 설정

* [infra] : #153 yml 수정 배포

* [fix]: #142 타 자치기구 목록조회 수정

* [feat] : #142 댓글 권한 추가

* [feat] : #142 관리자 권한추가

* [feat]: #142 공식댓글 수정 예외처리

* [feat] : #166 서비스 공지사항 board code 추가

* [feat] : #166 서비스 공지사항 리스트 조회

* [feat] : #166 서비스 공지사항 글쓰기 ACL

* [feat] : #166 서비스 공지사항 단건 게시물 ACL

* [feat] : #166 배치 처리에 서비스 공지사항 추가

* [feat] : #166 acl 리스트 중복 권한 제거

* [fix] : #166 서비스 공지사항 단건조회 수정 및 리스트조회에  status추가

* [feat] 로깅 세팅 (#170)

* [chore] 로그 파일 ignore 처리

* [feat] 요청 로그 aop

* [feat] cicd 스크립트 수정
- logback.xml 설정 추가

---------

Co-authored-by: Bae Hyeonseo <[email protected]>
Co-authored-by: chahyunsoo <[email protected]>
Co-authored-by: qogustj <[email protected]>
Co-authored-by: Jeoongu <[email protected]>
Co-authored-by: jeongu <[email protected]>
Co-authored-by: 차현수 <[email protected]>
Co-authored-by: jinseok <[email protected]>
Co-authored-by: beakgugong <[email protected]>
Co-authored-by: JangInho <[email protected]>
Co-authored-by: Inho Jang <[email protected]>
  • Loading branch information
11 people authored Jan 18, 2025
1 parent 34a1905 commit 3074b36
Show file tree
Hide file tree
Showing 14 changed files with 223 additions and 5 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ jobs:
env:
APPLICATION_MAIN: ${{ secrets.APPLICATION_MAIN }}

- name: logback.xml 설정
run: |
cd ./src/main/resources
touch ./logback.xml
echo "LOGBACK" > ./logback.xml
env:
LOGBACK_CONFIG: ${{ secrets.LOGBACK }}


- name: Gradle Caching
uses: actions/cache@v3
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,9 @@ out/
**/src/main/resources/**


### Log ###
**/logs/**


.DS_Store

Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ public class PostManageService {
"감사기구게시판", (post, isAuthor, ignored, user, another_ignored1, categoryName, fileResponseList, another_ignored2, another_ignored3) -> AuditPostDetailResponse.of(post, isAuthor, user, categoryName, fileResponseList),
"청원게시판", (post, isAuthor, isLiked, user, likeCount, categoryName, fileResponseList, postOfficialCommentResponseList, another_ignored3) -> PetitionPostDetailResponse.of(post, isAuthor, isLiked, user, likeCount, categoryName, fileResponseList, postOfficialCommentResponseList),
"건의게시판", (post, isAuthor, ignored, user, another_ignored1, categoryName, fileResponseList, postOfficialCommentResponseList, another_ignored3) -> SuggestionPostDetailResponse.of(post, isAuthor, user, categoryName, fileResponseList, postOfficialCommentResponseList),
"인권신고게시판", (post, isAuthor, ignored, user, another_ignored1,categoryName, fileResponseList,postOfficialCommentResponseList,rightsDetailList) -> RightsPostDetailResponse.of(post,isAuthor,user,categoryName,fileResponseList,postOfficialCommentResponseList, rightsDetailList)
"인권신고게시판", (post, isAuthor, ignored, user, another_ignored1,categoryName, fileResponseList,postOfficialCommentResponseList,rightsDetailList) -> RightsPostDetailResponse.of(post,isAuthor,user,categoryName,fileResponseList,postOfficialCommentResponseList, rightsDetailList),
"서비스공지사항", (post, isAuthor, another_ignored, user, another_ignored2, another_ignored3, fileResponseList, another_ignored4, another_ignored5) -> ServicePostDetailResponse.of(post,isAuthor,user,fileResponseList)
);
private final PostMapper postMapper;

Expand Down Expand Up @@ -193,7 +194,7 @@ public PostDetailRes<?> getPost(Long userId, String boardCode, Long postId) {
.map(postOfficialComment -> postOfficialCommentFormatter.format(postOfficialComment, userId))
.toList();
response = responseFunction.apply(post, isAuthor, null, user, null, post.getCategory(), fileResponseList, postOfficialCommentResponses,null);
} else if (board.getName().equals("제휴게시판") || board.getName().equals("공지사항게시판") || board.getName().equals("감사기구게시판")) {
} else if (board.getName().equals("제휴게시판") || board.getName().equals("공지사항게시판") || board.getName().equals("감사기구게시판") || board.getName().equals("서비스공지사항")) {
response = responseFunction.apply(post, isAuthor, null, user, null, post.getCategory(), fileResponseList, null,null);
} else if (board.getName().equals("분실물게시판")) {
response = responseFunction.apply(post, isAuthor, null, user, null, post.getCategory(), fileResponseList, null,null); //분실물 게시판은 파일첨부 제외
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package ussum.homepage.application.post.service.dto.response.postDetail;

import java.util.List;
import lombok.Builder;
import lombok.Getter;
import ussum.homepage.application.post.service.dto.response.FileResponse;
import ussum.homepage.domain.post.Post;
import ussum.homepage.domain.user.User;

@Getter
public class ServicePostDetailResponse extends PostDetailResDto{
private final List<FileResponse> fileResponseList;

@Builder
private ServicePostDetailResponse(Long postId, String categoryName, String authorName, String title, String content, String createdAt, String lastEditedAt, Boolean isAuthor,
List<FileResponse> fileResponseList, List<String> canAuthority) {
super(postId, categoryName, authorName, title, content, createdAt, lastEditedAt, isAuthor, canAuthority);
this.fileResponseList = fileResponseList;
}

public static ServicePostDetailResponse of(Post post, Boolean isAuthor, User user, List<FileResponse> fileResponseList) {
return ServicePostDetailResponse.builder()
.postId(post.getId())
.authorName(user.getName())
.title(post.getTitle())
.content(post.getContent())
.createdAt(post.getCreatedAt())
.lastEditedAt(post.getLastEditedAt())
.isAuthor(isAuthor)
.fileResponseList(fileResponseList)
.build();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package ussum.homepage.application.post.service.dto.response.postList;

import lombok.Builder;
import lombok.Getter;
import ussum.homepage.domain.post.Post;

@Getter
public class ServiceNoticePostResponse extends PostListResDto{
private final String status;

@Builder
protected ServiceNoticePostResponse(Long postId, String title, String content, String date, String category, String status) {
super(postId, title, content, date, category);
this.status = status;
}

public static ServiceNoticePostResponse of(Post post) {
return ServiceNoticePostResponse.builder()
.postId(post.getId())
.title(post.getTitle())
.category(post.getCategory())
.date(post.getCreatedAt())
.status(post.getStatus())
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public void applyPermissionsToPostDetail(PostDetailRes<?> postDetailRes, Long us
if (boardCode.equals("청원게시판") && postAclManager.hasPermission(userId, boardCode, "REACTION")) {
allowedAuthorities.add("REACTION");
}
if (boardCode.equals("서비스공지사항") && postAclManager.hasPermission(userId, boardCode, "EDIT")) {
allowedAuthorities.add("EDIT");
}
}

postDetailRes.validAuthority(allowedAuthorities);
Expand Down Expand Up @@ -93,6 +96,9 @@ private void addPermissionAuthorities(List<String> allowedAuthorities, List<Stri
deniedAuthorities.add("READ");
}
} else allowedAuthorities.add("READ");
} else if (boardCode.equals("서비스공지사항")) {
if (allowedAuthorities.isEmpty())
deniedAuthorities.add("WRITE");
} else allowedAuthorities.add("READ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class PostResponseFactoryProvider {
factoryMap.put("자료집게시판", new DataPostResponseFactory());
factoryMap.put("건의게시판", new SuggestionPostResponseFactory());
factoryMap.put("인권신고게시판", new RightsPostResponseFactory());
factoryMap.put("서비스공지사항", new ServiceNoticePostResponseFactory());
}

public static PostListResponseFactory getFactory(String boardName) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package ussum.homepage.domain.post.service.factory.postList;

import ussum.homepage.application.post.service.dto.response.postList.PostListResDto;
import ussum.homepage.application.post.service.dto.response.postList.ServiceNoticePostResponse;
import ussum.homepage.domain.post.Post;
import ussum.homepage.domain.post.service.PostReader;
import ussum.homepage.domain.postlike.service.PostReactionReader;
import ussum.homepage.domain.user.service.UserReader;

public class ServiceNoticePostResponseFactory implements PostListResponseFactory{
@Override
public PostListResDto createResponse(Post post, PostReader postReader, PostReactionReader postReactionReader,
UserReader userReader) {
return ServiceNoticePostResponse.of(post);
}

}
101 changes: 101 additions & 0 deletions src/main/java/ussum/homepage/global/logging/LoggingAspect.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
package ussum.homepage.global.logging;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.lang.reflect.Method;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component;

@Aspect
@Component
@RequiredArgsConstructor
@Slf4j
public class LoggingAspect {

private final HttpServletRequest request;
private final ObjectMapper objectMapper; // JSON 변환용

@Around("within(ussum.homepage.application.*.controller..*)")
public Object logApi(ProceedingJoinPoint joinPoint) throws Throwable {
// 요청 정보 로깅
MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
Object[] args = joinPoint.getArgs();
Long userId = getUserId(args);
String httpMethod = request.getMethod();
String requestUri = request.getRequestURI();
String operationSummary = getOperationSummary(methodSignature.getMethod());
String queryString = request.getQueryString();

String requestBody = getRequestBody(args);
log.info("\n----Request Log----\n"
+ "API : {}\n"
+ "Method : {}\n"
+ "User Id : {}\n"
+ "API Path : {}\n"
+ "Query String : {}\n"
+ "Request Body : {}\n"
+ "---------------",
operationSummary, httpMethod, userId, requestUri, queryString, requestBody);

// 실제 메소드 실행
Object response = joinPoint.proceed();

// 응답 정보 로깅
String responseBody = getResponseBody(response);
log.info("\n----Response Log----\n"
+ "API : {}\n"
+ "Response Body : {}\n"
+ "---------------",
operationSummary, responseBody);

return response;
}

private Long getUserId(Object[] args) {
for (Object arg : args) {
if (arg instanceof Long) {
return (Long) arg;
}
}
return null;
}

private String getRequestBody(Object[] args) {
for (Object arg : args) {
if (arg != null && !(arg instanceof HttpServletRequest) && !(arg instanceof HttpServletResponse)) {
try {
return objectMapper.writeValueAsString(arg);
} catch (JsonProcessingException e) {
log.error("Failed to serialize request body: {}", e.getMessage());
return "Failed to serialize request body";
}
}
}
return "No Request Body";
}

private String getResponseBody(Object response) {
try {
return objectMapper.writeValueAsString(response);
} catch (JsonProcessingException e) {
log.error("Failed to serialize response body: {}", e.getMessage());
return "Failed to serialize response body";
}
}

private String getOperationSummary(Method method) {
Operation operation = method.getAnnotation(Operation.class);
if (operation != null) {
return operation.summary();
}
return "Summary 없음";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ public enum TargetGroup {
CENTRAL_ORGANIZATION("중앙기구"),
AUDIT_COMMITTEE("감사위원회"),
CLUB_UNION("동아리연합회"),
STUDENT_RIGHTS_REPORT_SUBMISSION("인권신고접수");
STUDENT_RIGHTS_REPORT_SUBMISSION("인권신고접수"),
ADMIN("관리자");

private final String stringTargetGroup;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ public void updatePostStatusEmergencyToGeneralInBatches() {
List<Long> batchIds = queryFactory
.select(postEntity.id)
.from(postEntity)
.where(postEntity.boardEntity.id.eq(2L) // 공지사항 게시판 ID가 1이라고 가정
.where(postEntity.boardEntity.id.in(2L,9L) // 공지사항 게시판 ID가 2이라고 가정
.and(postEntity.status.ne(Status.GENERAL)) // 상태가 GENERAL이 아닌 것
.and(postEntity.createdAt.before(threeDaysAgo))) // 3일 이전에 생성된 것
.limit(batchSize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public enum BoardCode {
PETITION("청원게시판", 5),
DATA("자료집게시판", 6),
SUGGESTION("건의게시판", 7),
RIGHTS("인권신고게시판", 8);
RIGHTS("인권신고게시판", 8),
SERVICE_NOTICE("서비스공지사항",9);

private final String stringBoardCode;
private final int boardId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public enum Category {
RECEIVED("접수완료"),
ANSWERED("답변완료"),
COMPLETED("종료됨"),

//건의 게시판(답변완료, 답변대기)
PENDING("답변대기"),

Expand All @@ -59,6 +60,7 @@ public enum Category {

//인권신고게시판
STAND_BY("접수대기"),

//중앙 : 총학생회, 중앙운영위원회, 중앙선거관리위원회, 동아리연합회
//단과대 : IT대학, 인문대학, 융합특성화자유전공학부, 사회과학대학, 공과대학, 경영대학, 경제통상대학, 자연과학대학, 법과대학
STUDENT_COUNCIL("총학생회"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ussum.homepage.application.comment.service;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class CommentServiceTest {
@Autowired
private CommentService commentService;

@Test
void deletePostWhileCreateComment(){

}
}

0 comments on commit 3074b36

Please sign in to comment.