Skip to content

Commit

Permalink
Merge pull request #289 from cgk95/fix/#233
Browse files Browse the repository at this point in the history
Fix : createdAt, modifiedAt의 타입을 LocalDateTime 으로 변경
  • Loading branch information
chan99k authored Mar 13, 2024
2 parents 50eaef9 + ccdeb4c commit ce860d0
Show file tree
Hide file tree
Showing 19 changed files with 286 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.kernel360.product.entity.Product;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
* DTO for {@link com.kernel360.product.entity.Product}
Expand Down Expand Up @@ -36,9 +37,9 @@ public record ProductDetailDto(
String manufactureMethod,
String manufactureNation,
String violationInfo,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy
//TODO 브랜드 엔티티
) {
Expand Down Expand Up @@ -72,9 +73,9 @@ public static ProductDetailDto of(
String manufactureMethod,
String manufactureNation,
String violationInfo,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy
) {
return new ProductDetailDto(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.kernel360.product.enumset.SafetyStatus;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
* DTO for {@link com.kernel360.product.entity.Product}
Expand All @@ -18,9 +19,9 @@ public record ProductDto(
Integer viewCount,
String brand,
String upperItem,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy
) {

Expand All @@ -34,9 +35,9 @@ public static ProductDto of(
String brand,
String upperItem,
Integer viewCount,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy
) {
return new ProductDto(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
import com.kernel360.product.dto.ProductDto;
import com.kernel360.review.entity.Review;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

public record AdminReviewDto(Long reviewNo,
ProductDto productDto,
BigDecimal starRating,
String title,
String contents,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy) {

public static AdminReviewDto of(
Expand All @@ -21,9 +21,9 @@ public static AdminReviewDto of(
BigDecimal starRating,
String title,
String contents,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy
) {
return new AdminReviewDto(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public Page<AdminReviewDto> getReviews(String sortBy, Pageable pageable) {
@Transactional(readOnly = true)
public AdminReviewDto getReview(Long reviewNo) {
log.info("리뷰 단건 조회 -> review_no {}", reviewNo);

return AdminReviewDto.from(reviewRepository.findByReviewNo(reviewNo));
// FIXME :: Admin member 작업 이후 Admin Review 리팩터링 필요 -> 임시로 CRUDRepository 의 GetReferenceById 사용
return AdminReviewDto.from(reviewRepository.getReferenceById(reviewNo));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package com.kernel360;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@Disabled
@SpringBootTest
class ModuleAdminApplicationTests {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.kernel360.commoncode.entity.CommonCode;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
* DTO for {@link com.kernel360.commoncode.entity.CommonCode}
Expand All @@ -15,10 +16,10 @@ public record CommonCodeDto(Long codeNo,

Boolean isUsed,
String description,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,

LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy) {
/**
* @param codeNo, codeName
Expand All @@ -32,9 +33,9 @@ public static CommonCodeDto of(
Integer sortOrder,
Boolean isUsed,
String description,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy
) {
return new CommonCodeDto(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.kernel360.member.enumset.Gender;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
* DTO for {@link com.kernel360.member.entity.Member}
Expand All @@ -15,9 +16,9 @@ public record MemberDto(Long memberNo,
String password,
String gender,
String age,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy,
String jwtToken
) {
Expand All @@ -29,9 +30,9 @@ public static MemberDto of(
String password,
String gender,
String age,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy,
String jwtToken
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.kernel360.product.entity.Product;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
* DTO for {@link com.kernel360.product.entity.Product}
Expand Down Expand Up @@ -36,9 +37,9 @@ public record ProductDetailDto(
String manufactureMethod,
String manufactureNation,
String violationInfo,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy
//TODO 브랜드 엔티티
) {
Expand Down Expand Up @@ -72,9 +73,9 @@ public static ProductDetailDto of(
String manufactureMethod,
String manufactureNation,
String violationInfo,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy
) {
return new ProductDetailDto(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import com.kernel360.product.entity.Product;
import com.kernel360.product.enumset.SafetyStatus;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
* DTO for {@link com.kernel360.product.entity.Product}
Expand All @@ -18,9 +17,9 @@ public record ProductDto(
Integer viewCount,
String brand,
String upperItem,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy
) {

Expand All @@ -34,9 +33,9 @@ public static ProductDto of(
String brand,
String upperItem,
Integer viewCount,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy
) {
return new ProductDto(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.kernel360.review.entity.Review;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
Expand All @@ -17,9 +17,9 @@ public record ReviewRequestDto(Long reviewNo,
BigDecimal starRating,
String title,
String contents,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy,
List<String> files) {

Expand All @@ -30,9 +30,9 @@ public static ReviewRequestDto of(
BigDecimal starRating,
String title,
String contents,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy,
List<String> files
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

import com.kernel360.member.dto.MemberDto;
import com.kernel360.product.dto.ProductDetailDto;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
Expand All @@ -16,9 +15,9 @@ public record ReviewResponseDto(Long reviewNo,
BigDecimal starRating,
String title,
String contents,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy,
List<String> files) {

Expand All @@ -29,9 +28,9 @@ public static ReviewResponseDto of(
BigDecimal starRating,
String title,
String contents,
LocalDate createdAt,
LocalDateTime createdAt,
String createdBy,
LocalDate modifiedAt,
LocalDateTime modifiedAt,
String modifiedBy,
List<String> files
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand All @@ -23,9 +23,9 @@ public class ReviewSearchResult {
BigDecimal starRating;
String title;
String contents;
LocalDate createdAt;
LocalDateTime createdAt;
String createdBy;
LocalDate modifiedAt;
LocalDateTime modifiedAt;
String modifiedBy;

// member
Expand Down
Loading

0 comments on commit ce860d0

Please sign in to comment.