-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #396 from softeerbootcamp-2nd/dev
MAIN MERGE
- Loading branch information
Showing
62 changed files
with
1,981 additions
and
312 deletions.
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
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
56 changes: 56 additions & 0 deletions
56
backend/src/main/java/autoever2/cartag/controller/QuoteController.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,56 @@ | ||
package autoever2.cartag.controller; | ||
|
||
import autoever2.cartag.domain.car.BoughtCarDto; | ||
import autoever2.cartag.domain.quote.HistoryShortDto; | ||
import autoever2.cartag.domain.quote.QuoteDataDto; | ||
import autoever2.cartag.domain.quote.QuoteInfoDto; | ||
import autoever2.cartag.service.CarService; | ||
import autoever2.cartag.service.QuoteService; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.Parameter; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
import java.util.List; | ||
|
||
@RestController | ||
@RequestMapping("/api/quote") | ||
@RequiredArgsConstructor | ||
public class QuoteController { | ||
|
||
private final CarService carService; | ||
private final QuoteService quoteService; | ||
|
||
@Operation(summary = "추천 견적 그래프 제공 API", description = "유사견적(최대 4개)와 판매횟수 제공") | ||
@ApiResponses(value = { | ||
@ApiResponse(responseCode = "200", description = "조회 성공", content = @Content(schema = @Schema(implementation = HistoryShortDto.class))) | ||
}) | ||
@PostMapping("/list") | ||
public List<HistoryShortDto> getRecommendedList(@RequestBody QuoteDataDto quoteDataDto) { | ||
List<HistoryShortDto> result = quoteService.findTopHistory(quoteDataDto); | ||
return result; | ||
} | ||
|
||
@Operation(summary = "차량 구매 정보 반환 api", description = "차량 구매 정보 조회 method") | ||
@ApiResponses(value = { | ||
@ApiResponse(responseCode = "200", description = "조회 성공", content = @Content(schema = @Schema(implementation = BoughtCarDto.class))), | ||
}) | ||
@GetMapping("bought/infos") | ||
public List<BoughtCarDto> getAllHistorySum() { | ||
return carService.findAllBoughInfos(); | ||
} | ||
|
||
@Operation(summary = "차량 공유하기를 위한 api", description = "차량 공유를 위한 정보 반환") | ||
@ApiResponses(value = { | ||
@ApiResponse(responseCode = "200", description = "조회 성공", content = @Content(schema = @Schema(implementation = QuoteInfoDto.class))), | ||
}) | ||
@PostMapping("/infos/shares") | ||
public QuoteInfoDto getQuoteDetail(@Parameter(description = "선택한 id 리스트") @RequestBody QuoteDataDto idList) { | ||
QuoteInfoDto data = carService.findShareInfoDto(idList); | ||
return data; | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
backend/src/main/java/autoever2/cartag/controller/RecommendController.java
This file was deleted.
Oops, something went wrong.
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
31 changes: 0 additions & 31 deletions
31
backend/src/main/java/autoever2/cartag/domain/model/PowerTrainMappedDto.java
This file was deleted.
Oops, something went wrong.
12 changes: 12 additions & 0 deletions
12
backend/src/main/java/autoever2/cartag/domain/option/QuoteSubOptionDto.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 |
---|---|---|
@@ -1,13 +1,25 @@ | ||
package autoever2.cartag.domain.option; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter @Setter | ||
@NoArgsConstructor | ||
public class QuoteSubOptionDto { | ||
private int optionId; | ||
private String optionName; | ||
private Long optionPrice; | ||
private String optionTitle; | ||
private String optionImage; | ||
|
||
@Builder | ||
public QuoteSubOptionDto(int optionId, String optionName, Long optionPrice, String optionTitle, String optionImage) { | ||
this.optionId = optionId; | ||
this.optionName = optionName; | ||
this.optionPrice = optionPrice; | ||
this.optionTitle = optionTitle; | ||
this.optionImage = optionImage; | ||
} | ||
} |
Oops, something went wrong.