Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
package com.jootalkpia.chat_server.dto;

import com.fasterxml.jackson.annotation.JsonProperty;

public record MinutePriceResponse(
@JsonProperty("code")
String code,
@JsonProperty("htsKorIsnm")
String stockName,
@JsonProperty("stckBsopDate")
String businessDate,
@JsonProperty("stckCntgHour")
String tradingTime,
@JsonProperty("stckPrpr")
String currentPrice,
@JsonProperty("stckOprc")
String openPrice,
@JsonProperty("stckHgpr")
String openingPrice,
String highPrice,
@JsonProperty("stckLwpr")
String lowPrice,
@JsonProperty("cntgVol")
String tradingVolume,
@JsonProperty("acmlTrPbmn")
String totalTradeAmount
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
import static com.jootalkpia.stock_server.stocks.advice.util.StockValidationUtils.validateMinutePriceOutput;

public record MinutePriceSimpleResponse(
String code,
String htsKorIsnm,
String stckBsopDate,
String stckCntgHour,
String stckPrpr,
String stckOprc,
String stckHgpr,
String stckLwpr,
String cntgVol,
String acmlTrPbmn
String code, //주식 코드
String stockName, // 이름
String businessDate, // 영업 일자
String tradingTime, // 체결 시간
String currentPrice, //현재가
String openingPrice, // 시가2
String highPrice, //최고가
String lowPrice, //최저가
String tradingVolume, //체결 거래량
String totalTradeAmount // 누적 거래 대금
) {

public static MinutePriceSimpleResponse from(MinutePriceDetailedResponse minutePriceDto, String code) {
Expand All @@ -37,15 +37,15 @@ public static MinutePriceSimpleResponse from(MinutePriceDetailedResponse minuteP
public MinutePrice toDocument() {
return MinutePrice.of(
code,
htsKorIsnm,
stckBsopDate,
stckCntgHour,
stckPrpr,
stckOprc,
stckHgpr,
stckLwpr,
cntgVol,
acmlTrPbmn
stockName,
businessDate,
tradingTime,
currentPrice,
openingPrice,
highPrice,
lowPrice,
tradingVolume,
totalTradeAmount
);
}
}