Skip to content

Commit

Permalink
fix: Resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Park-Young-Hun committed Jan 30, 2024
1 parent adcfeea commit d405441
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
21 changes: 21 additions & 0 deletions src/main/java/com/fullcar/carpool/application/CarpoolMapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,33 @@ public CarpoolResponseDto toDto(Carpool carpool, Member member) {
.money(carpool.getCost().getMoney())
.content(carpool.getContent())
.moodType(carpool.getMoodType())
.carpoolState(carpool.getCarpoolState())
.companyName(member.getCompany().getCompanyName())
.gender(member.getGender())
.createdAt(carpool.getCreatedAt())
.build();
}

public CarpoolResponseDto.CarpoolDetailDTO toDetailDto(Carpool carpool, Member member, Car car) {
return CarpoolResponseDto.CarpoolDetailDTO.builder()
.id(carpool.getCarpoolId().getId())
.pickupLocation(carpool.getPickupLocation())
.periodType(carpool.getCost().getPeriodType())
.money(carpool.getCost().getMoney())
.content(carpool.getContent())
.moodType(carpool.getMoodType())
.carpoolState(carpool.getCarpoolState())
.companyName(member.getCompany().getCompanyName())
.gender(member.getGender())
.createdAt(carpool.getCreatedAt())
.nickname(member.getNickname())
.carNo(car.getCarNo())
.carName(car.getCarName())
.carBrand(car.getCarBrand())
.carColor(car.getCarColor())
.build();
}

public Carpool toEntity(Member member, CarpoolRequestDto carpoolRequestDto) {
return Carpool.builder()
.carpoolId(carpoolIdService.nextId())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.springframework.validation.annotation.Validated;

import java.util.List;
import java.util.stream.Collectors;


@Validated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Slice;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@Tag(name = "[Carpool] 카풀 관련 API")
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/fullcar/member/domain/member/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
Expand Down

0 comments on commit d405441

Please sign in to comment.