-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature/Inhabas#228] 공모전 게시판 API 구현 #230
Merged
Merged
Changes from 48 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
165e2d9
[feature/Inhabas#228] VO 일부 수정 및 컬럼,테이블 이름 수정
skytin1004 39e7d7f
[feature/Inhabas#228] VO 구현 및 DTO 변수 일부 수정
skytin1004 d55f23f
[feature/Inhabas#228] VO 구현
skytin1004 e4ef474
[feature/Inhabas#228] DTO, Service 구현
skytin1004 29356e2
[feature/Inhabas#228] Service 오타 수정
skytin1004 e4efb66
[feature/Inhabas#228] Service 오타 수정
skytin1004 4acbd63
[feature/Inhabas#228] 공모전 게시판 검색 기능 추가
skytin1004 08272f7
[feature/Inhabas#228] 공모전 게시판 검색 기능 추가
skytin1004 cb8ac5c
[feature/Inhabas#228] 공모전 게시판 검색 repositoryImpl로직 변경 및 serviceImpl 구현
skytin1004 889dc40
[feature/Inhabas#228] 공모전 게시판 검색 관련 DTO 수정, association 추가
skytin1004 83a7e95
[feature/Inhabas#228] 공모전 게시판 DTO D-Day 추가
skytin1004 2abf0b4
Merge branch 'InhaBas:master' into contest-board
skytin1004 cbea217
[feature/Inhabas#228] 공모전 게시판 파일 URI 저장방식 갱신, ContestType에 따른 게시판 분리 …
skytin1004 f722f29
[feature/Inhabas#228] ContestType 컨버터 구현, Controller 수정
skytin1004 e78ab14
[feature/Inhabas#228] Controller response 정리
skytin1004 a956460
[feature/Inhabas#228] Controller 오타 수정
skytin1004 69200ae
[feature/Inhabas#228] 불필요한 코드 삭제
skytin1004 b8ee27e
[feature/Inhabas#228] Image파일 보장
skytin1004 462c90d
[feature/Inhabas#228] 예외 처리 ErrorCode 사용
skytin1004 9fdc3a8
[feature/Inhabas#228] 세부 필터링 구현
skytin1004 bc22526
[feature/Inhabas#228] 공모전 정렬 기능 수정
skytin1004 1ee68ca
[feature/Inhabas#228] spotlessApply
skytin1004 c6115ca
[feature/Inhabas#228] 공모전 게시판 구현 완료
skytin1004 5e822d3
[feature/Inhabas#228] 공모전 게시판 구현 완료 - 리펙토링
skytin1004 78ff80e
[feature/Inhabas#228] 타입 문제 해결
skytin1004 a5cbe27
[feature/Inhabas#228] 썸네일, 이미지, 기타 파일 분류 완료
skytin1004 f72de2b
[feature/Inhabas#228] 분류 기능 리펙토링
skytin1004 f72cbcc
[feature/Inhabas#228] domain 테스트 파일 생성
skytin1004 0911dd2
[feature/Inhabas#228] 테이블 수정에 따른 컬럼 이름 및 조건 수정
skytin1004 04ef87d
[feature/Inhabas#228] contest 유틸 클래스 global 이동 및 리펙토링
skytin1004 38792c3
[feature/Inhabas#228] 공모전 게시판 정렬 기능 구현 완료
skytin1004 cfca94a
[feature/Inhabas#228] 공모전 게시판 정렬 기능 controller 리펙토링
skytin1004 7256e24
[feature/Inhabas#228] 공모전 게시판 도메인 테스트 코드 구현
skytin1004 7b2f41d
Merge branch 'master' of https://github.com/skytin1004/Inhabas.com-ap…
skytin1004 6950a35
[feature/Inhabas#234] 충돌 해결
skytin1004 d27c6c7
[feature/Inhabas#234] 충돌 해결
skytin1004 b43e0fe
Merge branch 'master' of https://github.com/skytin1004/Inhabas.com-ap…
skytin1004 db74a33
[feature/Inhabas#234] 충돌 해결
skytin1004 1426dd5
[feature/Inhabas#234] 최근 커밋 반영ㅇ
skytin1004 9747ad1
[feature/Inhabas#234] 서비스 테스트 코드 구현 및 리펙토링
skytin1004 51c8209
[feature/Inhabas#234] 서비스 및 레포지토리 테스트 코드 오류 해결중..
skytin1004 4effd25
[feature/Inhabas#234] service, repository 테스트 구현 완료ㅛ
skytin1004 f7e27d8
[feature/Inhabas#234] controller 테스트 구현 완료
skytin1004 9c97aa4
[feature/Inhabas#234] 공모전 게시판 config 구현
skytin1004 277c02a
[feature/Inhabas#234] requestPart 개선
skytin1004 5d7c35b
[feature/Inhabas#234] requestPart 문제 해결, 모든 테스트 구현
skytin1004 e9067db
[feature/Inhabas#234] spotleaaApply
skytin1004 3158f12
[feature/Inhabas#234] 리뷰 반영
skytin1004 240b1d9
[feature/Inhabas#234] 리뷰 반영
skytin1004 0b305dc
[feature/Inhabas#234] 리펙토링, 공모전 게시판 구현
skytin1004 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
resource-server/src/main/java/com/inhabas/api/domain/contest/domain/ContestField.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.inhabas.api.domain.contest.domain; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Embedded; | ||
import javax.persistence.Entity; | ||
import javax.persistence.EntityListeners; | ||
import javax.persistence.GeneratedValue; | ||
import javax.persistence.GenerationType; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import org.springframework.data.jpa.domain.support.AuditingEntityListener; | ||
|
||
import com.inhabas.api.domain.BaseEntity; | ||
import com.inhabas.api.domain.contest.domain.valueObject.ContestFieldName; | ||
|
||
@Entity | ||
@Table(name = "CONTEST_FIELD") | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@EntityListeners(AuditingEntityListener.class) | ||
public class ContestField extends BaseEntity { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "ID") | ||
private Long id; | ||
|
||
@Embedded private ContestFieldName name; | ||
|
||
@Builder | ||
public ContestField(String name) { | ||
this.name = new ContestFieldName(name); | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 공모전 세부 분야의 데이터를 저장하는 ContestField 테이블 생성 id: 1 = 빅데이터 이렇게 구성하려고 합니다. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...ver/src/main/java/com/inhabas/api/domain/contest/domain/valueObject/ContestFieldName.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.inhabas.api.domain.contest.domain.valueObject; | ||
|
||
import java.util.Objects; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Embeddable; | ||
import javax.persistence.Transient; | ||
|
||
import com.inhabas.api.auth.domain.error.businessException.InvalidInputException; | ||
|
||
@Embeddable | ||
public class ContestFieldName { | ||
|
||
@Column(name = "NAME", length = 15, nullable = false) | ||
private String value; | ||
|
||
@Transient private final int MAX_LENGTH = 15; | ||
|
||
public ContestFieldName() {} | ||
|
||
public ContestFieldName(String value) { | ||
if (validate(value)) this.value = value; | ||
else throw new InvalidInputException(); | ||
} | ||
|
||
private boolean validate(Object value) { | ||
if (Objects.isNull(value)) return false; | ||
if (!(value instanceof String)) return false; | ||
|
||
String o = (String) value; | ||
if (o.isBlank()) return false; | ||
return o.length() < MAX_LENGTH; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...e-server/src/main/java/com/inhabas/api/domain/contest/domain/valueObject/ContestType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.inhabas.api.domain.contest.domain.valueObject; | ||
|
||
public enum ContestType { | ||
CONTEST("contest", 18), | ||
ACTIVITY("activity", 19); | ||
|
||
private final String boardType; | ||
private final int menuId; | ||
|
||
ContestType(String boardType, int menuId) { | ||
this.boardType = boardType; | ||
this.menuId = menuId; | ||
} | ||
|
||
public String getBoardType() { | ||
return boardType; | ||
} | ||
|
||
public int getMenuId() { | ||
return menuId; | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
resource-server/src/main/java/com/inhabas/api/domain/contest/domain/valueObject/OrderBy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.inhabas.api.domain.contest.domain.valueObject; | ||
|
||
import com.inhabas.api.domain.contest.domain.QContestBoard; | ||
import com.querydsl.core.types.OrderSpecifier; | ||
|
||
public enum OrderBy { | ||
DATE_CONTEST_END { | ||
public OrderSpecifier<?> getOrderBy(QContestBoard contestBoard) { | ||
return contestBoard.dateContestEnd.desc(); | ||
} | ||
}, | ||
|
||
DATE_CREATED { | ||
public OrderSpecifier<?> getOrderBy(QContestBoard contestBoard) { | ||
return contestBoard.dateCreated.desc(); | ||
} | ||
}; | ||
|
||
public abstract OrderSpecifier<?> getOrderBy(QContestBoard contestBoard); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enum 형태인 ContestType을 url에서 소문자로 사용하기 위해 Custom 컨버터를 사용했습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
기존에 만들어져 있던 Menu 컨버터도 같이 등록했습니다.