-
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 #96 from SWM-WeLike2Coding/dev_deploy
conf: 운영 서버 배포를 위한 머지 작업
- Loading branch information
Showing
6 changed files
with
178 additions
and
9 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
src/main/java/com/wl2c/elswhereproductservice/client/analysis/api/AnalysisServiceClient.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,18 @@ | ||
package com.wl2c.elswhereproductservice.client.analysis.api; | ||
|
||
import com.wl2c.elswhereproductservice.client.analysis.dto.response.ResponseAIResultDto; | ||
import com.wl2c.elswhereproductservice.domain.product.model.dto.request.RequestProductIdListDto; | ||
import jakarta.validation.Valid; | ||
import org.springframework.cloud.openfeign.FeignClient; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
import java.util.List; | ||
|
||
@FeignClient(name = "analysis-service") | ||
public interface AnalysisServiceClient { | ||
|
||
@PostMapping("/v1/ai/list") | ||
List<ResponseAIResultDto> getAIResultList(@Valid @RequestBody RequestProductIdListDto requestProductIdListDto); | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
...ava/com/wl2c/elswhereproductservice/client/analysis/dto/response/ResponseAIResultDto.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.wl2c.elswhereproductservice.client.analysis.dto.response; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
import java.math.BigDecimal; | ||
|
||
@Getter | ||
@Builder | ||
public class ResponseAIResultDto { | ||
|
||
@Schema(description = "AI 결과 id", example = "1") | ||
private final Long AIResultId; | ||
|
||
@Schema(description = "상품 id", example = "1") | ||
private final Long productId; | ||
|
||
@Schema(description = "AI가 판단한 스텝다운 상품 안전도", example = "0.76") | ||
private final BigDecimal safetyScore; | ||
|
||
} |
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
57 changes: 57 additions & 0 deletions
57
...wl2c/elswhereproductservice/domain/product/model/dto/list/SummarizedOnSaleProductDto.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,57 @@ | ||
package com.wl2c.elswhereproductservice.domain.product.model.dto.list; | ||
|
||
import com.querydsl.core.annotations.QueryProjection; | ||
import com.wl2c.elswhereproductservice.domain.product.model.ProductType; | ||
import com.wl2c.elswhereproductservice.domain.product.model.entity.Product; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
import java.math.BigDecimal; | ||
import java.time.LocalDate; | ||
|
||
@Getter | ||
public class SummarizedOnSaleProductDto { | ||
|
||
@Schema(description = "상품 id", example = "1") | ||
private final Long id; | ||
|
||
@Schema(description = "발행 회사", example = "oo투자증권") | ||
private final String issuer; | ||
|
||
@Schema(description = "상품명", example = "oo투자증권 99999") | ||
private final String name; | ||
|
||
@Schema(description = "상품 유형", example = "STEP_DOWN or LIZARD or MONTHLY_PAYMENT or ETC") | ||
private final ProductType productType; | ||
|
||
@Schema(description = "기초자산", example = "KOSPI200 Index / HSCEI Index / S&P500 Index") | ||
private final String equities; | ||
|
||
@Schema(description = "수익률", example = "20.55") | ||
private final BigDecimal yieldIfConditionsMet; | ||
|
||
@Schema(description = "낙인 값", example = "45, 낙인 값이 없을 시 null return") | ||
private final Integer knockIn; | ||
|
||
@Schema(description = "청약 시작일", example = "2024-06-14") | ||
private final LocalDate subscriptionStartDate; | ||
|
||
@Schema(description = "청약 마감일", example = "2024-06-21") | ||
private final LocalDate subscriptionEndDate; | ||
|
||
@Schema(description = "AI가 판단한 상품 안전도", example = "0.89") | ||
private final BigDecimal safetyScore; | ||
|
||
public SummarizedOnSaleProductDto(Product product, BigDecimal safetyScore) { | ||
this.id = product.getId(); | ||
this.issuer = product.getIssuer(); | ||
this.name = product.getName(); | ||
this.productType = product.getType(); | ||
this.equities = product.getEquities(); | ||
this.yieldIfConditionsMet = product.getYieldIfConditionsMet(); | ||
this.knockIn = product.getKnockIn(); | ||
this.subscriptionStartDate = product.getSubscriptionStartDate(); | ||
this.subscriptionEndDate = product.getSubscriptionEndDate(); | ||
this.safetyScore = safetyScore; | ||
} | ||
} |
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