Skip to content
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

[feat] : 경매글 등록 API 구현 #23

Merged
merged 25 commits into from
Feb 19, 2024
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a8e62d6
[feat] : 거래희망 장소 필드 nullable true로 변경
hyun2371 Feb 16, 2024
b989776
[feat] : Enum <-> String 간 변환 메서드 추가
hyun2371 Feb 16, 2024
f07469f
[feat] : 상품 카테고리 필드명 변경 및 생성자 추가
hyun2371 Feb 16, 2024
8cf6dcd
[feat] : 경매 에러코드 추가
hyun2371 Feb 16, 2024
607813f
[feat] : 경매 생성 controller 코드 작성 및 request 추가"
hyun2371 Feb 16, 2024
5f0bc83
[feat] : Enum 관련 에러 코드 추가
hyun2371 Feb 17, 2024
0fb8339
[Style] : Enum 변수명 변경
hyun2371 Feb 17, 2024
2cd4787
[feat] : service dto 및 mapper 추가
hyun2371 Feb 17, 2024
4405285
[feat] : 전역 예외 처리 NotFoundException 처리 함수 추가
hyun2371 Feb 17, 2024
128bc55
[feat] auctionService 추가 및 관련 repository 추가
hyun2371 Feb 17, 2024
76de873
[feat] : auctionErrorCode 추가 및 불필요한 코드 삭제
hyun2371 Feb 17, 2024
177382f
[feat] : @ valid, @ EnableJpaAuditing 어노테이션 추가
hyun2371 Feb 17, 2024
3e0406f
[feat] : 카테고리 값 Enum -> String 타입 변경
hyun2371 Feb 17, 2024
76fc961
[refactor] : 코드 리포멧팅
hyun2371 Feb 17, 2024
a7389ae
[feat] : dto validation 어노테이션 추가
hyun2371 Feb 17, 2024
92d604f
[feat] auction, product test fixture 추가
hyun2371 Feb 18, 2024
443efd8
[chore] : testFixtures 추가해 모듈간 테스트 코드 중복 줄이기
hyun2371 Feb 18, 2024
9857e40
[feat] : 경매글 등록 서비스 테스트 코드 추가
hyun2371 Feb 18, 2024
7945f68
[fix] : springboottest 컴포넌트 스캔 에러 해결
hyun2371 Feb 18, 2024
9622d47
[feat] controller 테스트용 support 추가
hyun2371 Feb 18, 2024
d514c4f
[style] dto 필드명 변경 및 enum 값 변경
hyun2371 Feb 18, 2024
f65ea07
[feat] : 경매 등록 통합 테스트 추가
hyun2371 Feb 18, 2024
2a1169b
[refactor] : 코드 리포멧팅
hyun2371 Feb 18, 2024
0de31e7
[fix] : 403 에러 해결 위해 security 임시 비활성화
hyun2371 Feb 18, 2024
a8f15ae
[fix] : jar 파일 생성 안되는 에러 해결
hyun2371 Feb 18, 2024
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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package dev.handsup.auction.domain.auction_field;

import static dev.handsup.auction.exception.AuctionErrorCode.*;

import java.util.Arrays;

import dev.handsup.common.exception.ValidationException;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

@@ -15,4 +20,15 @@ public enum PurchaseTime {
UNKNOWN("모름");

private final String description;

public static PurchaseTime of(String input){
return Arrays.stream(values())
.filter(time -> time.isEqual(input))
.findAny()
.orElseThrow(() -> new ValidationException(NOT_FOUND_PRODUCT_STATUS));
}

private boolean isEqual(String input) {
return input.equalsIgnoreCase(this.description);
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package dev.handsup.auction.domain.auction_field;

import static dev.handsup.auction.exception.AuctionErrorCode.*;

import java.util.Arrays;

import dev.handsup.common.exception.ValidationException;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

@@ -11,4 +16,15 @@ public enum TradeMethod {
DELIVER("택배");

private final String description;

public static TradeMethod of(String input){
return Arrays.stream(values())
.filter(method -> method.isEqual(input))
.findAny()
.orElseThrow(() -> new ValidationException(NOT_FOUND_PRODUCT_STATUS));
}

private boolean isEqual(String input) {
return input.equalsIgnoreCase(this.description);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package dev.handsup.auction.domain.product;

import static dev.handsup.auction.exception.AuctionErrorCode.*;

import java.util.Arrays;

import dev.handsup.common.exception.ValidationException;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public enum ProductStatus {

NEW("미개봉"),
CLEAN("깨끗함"),
DIRTY("더러움");

private final String description;

public static ProductStatus of(String input){
return Arrays.stream(values())
.filter(status -> status.isEqual(input))
.findAny()
.orElseThrow(() -> new ValidationException(NOT_FOUND_PRODUCT_STATUS));
}

private boolean isEqual(String input) {
return input.equalsIgnoreCase(this.description);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package dev.handsup.auction.domain.product.product_category;

import static dev.handsup.auction.exception.AuctionErrorCode.*;

import java.util.Arrays;

import dev.handsup.common.exception.ValidationException;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

@Getter
@RequiredArgsConstructor
public enum Category {

DIGITAL("디지털 기기"),
FURNITURE("가구"),
FASHION("패션");

private final String description;

public static Category of(String input){
return Arrays.stream(values())
.filter(value -> value.isEqual(input))
.findAny()
.orElseThrow(() -> new ValidationException(NOT_FOUND_PRODUCT_STATUS));
}

private boolean isEqual(String input) {
return input.equalsIgnoreCase(this.description);
}
}

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions core/src/main/java/dev/handsup/exception/ErrorCode.java

This file was deleted.

14 changes: 0 additions & 14 deletions core/src/main/java/dev/handsup/exception/NotFoundException.java

This file was deleted.

14 changes: 0 additions & 14 deletions core/src/main/java/dev/handsup/exception/ValidationException.java

This file was deleted.