Skip to content

Releases: chhs2131/dbsgAPI

0.0.8

27 May 03:02
3d40b77
Compare
Choose a tag to compare
0.0.8 Pre-release
Pre-release

/ipo/{ipoIndex}, /ipo/detail/{ipoIndex}

JSON 반환값 추가

  • 실권주 구주주 청약일: exStartDate, exEndDate
  • 자금의 사용목적: purposeOfFunds
  • 업종코드(서버 dto에만 추가, 클라이언트로 반환 x): sectorCode

정의

public class IpoDto {
    // 기본 정보
    private long ipoIndex;
    private String stockName;
    private String stockExchange;
    private String stockKinds;
    private String stockCode;
    private String dartCode;
    private String sector;
    private long profits;
    private long sales;

    // 일정 정보
    private String exStartDate;
    private String exEndDate;
    private String ipoForecastStart;
    private String ipoForecastEnd;
    private String ipoStartDate;
    private String ipoEndDate;
    private String ipoRefundDate;
    private String ipoDebutDate;

    private String ipoCancelBool;
    private String ipoCancelDate;
    private String ipoCancelReason;

    // 공모 정보
    private String purposeOfFunds;
    private long numberOfIpoShares;
    private double lockUpPercent;
    private double ipoInstitutionalAcceptanceRate;
    private int ipoPrice;
    private int ipoPriceLow;
    private int ipoPriceHigh;
    private int ipoMinDeposit;
    private String putBackOptionWho;
    private int putBackOptionPrice;
    private String putBackOptionDeadline;

    // private String underwriter;
    private String tag;
    private String registDate;
    private String updateDate;

0.0.7

25 May 15:27
2f3217d
Compare
Choose a tag to compare
0.0.7 Pre-release
Pre-release

API 서비스 구현

  • ipo
    • column 추가
      • ipo_cancel_* 철회신고서 (공모 진행이 비정상적으로 종료된 날짜)
        • 철회 여부 bool (Client Json)
        • 철회 신고서 발행일 date (Client Json)
        • 철회 사유 String (Client Json)
      • terminate_date 종료일 date (DB, 공모 진행이 종료된 날짜)
        • 비정상 종료 : 철회신고서 발행일
        • 정상 종료 : 상장일 (왜냐면 상장일 이전까지는 정정보고서 발행 가능함)
    • return json format 수정: 철회신고서 관련 항목 DB 추가로 인한 수정
      • ipo dto에 terminateDate 추가 (JSON 반환은 X)
    • ipoList 페이징 방식 적용
      • parameter
        • page (default 1)
        • num (default 100)
        • kind (default all) (현재 동작에 영향을 주진 않음. 이름바꿀거) (진행시점 구분용도로 사용하려고 함. ex) 청약진행중,, 상장완료,, 등에 구분)
  • comment
    • comment/{} 조회를 commentIndex로 수정
      • comment에 parameter로 ipoIndex를 입력하여 특정 종목만 조회 가능
      • default 값은 0으로, 기본값인 경우 전체 종목을 조회함.
    • comment JSON반환에 stockKinds 추가
  • 기타
    • swagger 설명 수정

JSON 반환값 수정사항

/ipo

ipo List

  • 공모 철회 관련 항목들을 추가하였습니다.
  • ipoCancelBool (String, 공모 철회 여부) (‘Y’ ‘N’ 형식) (’Y’인 경우 철회된 종목, 즉 공모진행X)
  • ipoCancelDate (String, 철회보고서 등록일) (0000-00-00 형식)

데이터 객체 선언

public class IpoSummaryDto {
    private long ipoIndex;
    private String stockName;
    private String stockExchange;
    private String stockKinds;

    private String ipoForecastStart;
    private String ipoForecastEnd;
    private String ipoStartDate;
    private String ipoEndDate;
    private String ipoRefundDate;
    private String ipoDebutDate;

    private String ipoCancelBool;
    private String ipoCancelDate;

    private String underwriter;
    private String tag;
    private String recentComment;
}

반환 예시

{
    "ipoIndex": 73,
    "stockName": "대한전선",
    "stockExchange": "코스피",
    "stockKinds": "실권주",
    "ipoForecastStart": null,
    "ipoForecastEnd": null,
    "ipoStartDate": "2022-03-08",
    "ipoEndDate": "2022-03-10",
    "ipoRefundDate": "2022-03-17",
    "ipoDebutDate": null,
    "ipoCancelBool": null,
    "ipoCancelDate": null,
    "underwriter": "KB증권,삼성증권,미래에셋증권",
    "tag": null,
    "recentComment": "공모청약일이 변경되었습니다. (2022-03-08 ~ 2022-03-10)"
  }

/ipo/{ipoIndex} 및 /ipo/detail/{ipoIndex}

  • 공모 철회 관련 항목들을 추가하였습니다.
  • ipoCancelBool (String, 공모 철회 여부) (‘Y’ ‘N’ 형식) (’Y’인 경우 철회된 종목, 즉 공모진행X)
  • ipoCancelDate (String, 철회보고서 등록일) (0000-00-00 형식)
  • ipoCancelReason (String, 공모 철회 사유)

데이터 객체 선언

public class IpoDto {
    // 기본 정보
    private long ipoIndex;
    private String stockName;
    private String stockExchange;
    private String stockKinds;
    private String stockCode;
    private String dartCode;
    private String sector;
    private long profits;
    private long sales;

    // 일정 정보
    private String ipoForecastStart;
    private String ipoForecastEnd;
    private String ipoStartDate;
    private String ipoEndDate;
    private String ipoRefundDate;
    private String ipoDebutDate;

    private String ipoCancelBool;
    private String ipoCancelDate;
    private String ipoCancelReason;

    // 공모 정보
    private long numberOfIpoShares;
    private double lockUpPercent;
    private double ipoInstitutionalAcceptanceRate;
    private int ipoPrice;
    private int ipoPriceLow;
    private int ipoPriceHigh;
    private int ipoMinDeposit;
    private String putBackOptionWho;
    private int putBackOptionPrice;
    private String putBackOptionDeadline;

    private String tag;
    private String registDate;
    private String updateDate;

반환 예시

{
  "ipo": {
    "ipoIndex": 96,
    "stockName": "오토앤",
    "stockExchange": "코스닥",
    "stockKinds": "공모주",
    "stockCode": "353590",
    "dartCode": "01084294",
    "sector": "자동차 신품 부품 및 내장품 판매업",
    "profits": 2061202483,
    "sales": 36733558625,
    "ipoForecastStart": "2022-01-05",
    "ipoForecastEnd": "2022-01-06",
    "ipoStartDate": "2022-01-11",
    "ipoEndDate": "2022-01-12",
    "ipoRefundDate": "2022-01-14",
    "ipoDebutDate": "2022-01-20",
    "ipoCancelBool": null,
    "ipoCancelDate": null,
    "ipoCancelReason": null,
    "numberOfIpoShares": 0,
    "lockUpPercent": 8.34,
    "ipoInstitutionalAcceptanceRate": 1713,
    "ipoPrice": 5300,
    "ipoPriceLow": 4200,
    "ipoPriceHigh": 4800,
    "ipoMinDeposit": 0,
    "putBackOptionWho": null,
    "putBackOptionPrice": 0,
    "putBackOptionDeadline": null,
    "tag": null,
    "registDate": "2022-04-13 16:06:20",
    "updateDate": "2022-05-24 15:42:43"
  }

/comment

  • stockKinds 추가 (String, 종목 유형 구분)

데이터 객체 선언

public class IpoCommentDto {
    private long commentIndex;
    private long ipoIndex;
    private String writer;
    private String stockName;
    private String stockKinds;
    private String comment;
    private List<String> commentList;
    private String registDate;
}

반환 예시

{
    "commentIndex": 123,
    "ipoIndex": 72,
    "writer": "string",
    "stockName": "LG에너지솔루션",
    "stockKinds": "공모주",
    "comment": "----가 변경되었습니다. - 외 3건",
    "commentList": "List형식. [----가 변경되었습니다. -----가 변경되었습니다. 상장일이 변경되었습니다.]",
    "registDate": "2022-01-01"
}

0.0.6: Merge pull request #2 from chhs2131/develop

13 May 15:38
d8beee3
Compare
Choose a tag to compare

기본 comment 업데이트(batch관련은 개발 필요) 및 기타 데이터 반환 형식 수정


API 서비스 구현

  • ipo list
    • offset paging 기반 잡기
      • controller 관련 변수 틀만 작성 (page, num)
    • 반환 항목 추가(dto) : ipo_forecast_startipo_forecast_end 추가 (스케줄과 공유에 따른 전달)
  • schedule
    • 사용 dto 변경 (기존 schedule dto → ipoSummary dto)
  • common
    • comment
      • comment에서 변동사항 전체를 확인할 수 있도록 수정
        • ipoCommentDto에 반환 값 추가 : List commentList
      • recentComment 표현방식 개선
        • 기존 nnnn가 정정되었습니다. → nnnn가 정정되었습니다. - 외 3건
        • 연속값으로 구성되어있는 항목들을 한번에 나타나게 수정
          • 공모청약일 (청약시작/종료)
          • 수요예측일 (예측시작/종료)
          • 공모가 밴드 (하단/상단)
          • ex) 공모청약일이 변경되었습니다. (2022-01-24 ~ 2022-01-25) - 외 3건
        • 정상적으로 불러오지 못한 데이터 (null, -1)에 대해서는 comment 표출 하지 않게 수정
      • Parameter page(페이지번호)에 기본값을 1로 지정

JSON 반환값 수정사항

/ipo 및 /ipo/schedule

  • 이제 두 항목 모두 같은 json 반환 형식을 가집니다.
  • ipo_forecast_start 항목 추가 (String)
  • ipo_forecast_end 항목 추가 (String)

데이터 객체 선언

public class IpoSummaryDto {
    private long ipoIndex;
    private String stockName;
    private String stockExchange;
    private String stockKinds;

    private String ipoForecastStart;
    private String ipoForecastEnd;
    private String ipoStartDate;
    private String ipoEndDate;
    private String ipoRefundDate;
    private String ipoDebutDate;

    private String underwriter;
    private String tag;
    private String recentComment;
}

반환 예시

{
    "ipoIndex": 6,
    "stockName": "테스트 수요예측이전",
    "stockExchange": "코스피",
    "stockKinds": "실권주",
    "ipoForecastStart": null,
    "ipoForecastEnd": "2022-06-01",
    "ipoStartDate": "2022-06-12",
    "ipoEndDate": "2020-06-12",
    "ipoRefundDate": "2022-06-12",
    "ipoDebutDate": "2022-06-13",
    "underwriter": "다올투자증권",
    "tag": null,
    "recentComment": "상장일이 변경되었습니다. (2022-06-13)"
  }

/ipo/comment

  • 데이터 변경 이력을 나타냅니다.
  • 해당 event에 변경된 모든 이력을 나타내는 commentList 항목 추가

데이터 객체 선언

public class IpoCommentDto {
    private long commentIndex;
    private long ipoIndex;
    private String writer;
    private String stockName;
    private String comment;
    private List<String> commentList;
    private String registDate;
}

반환 예시

{
    "commentIndex": 337,
    "ipoIndex": 112,
    "writer": "DB_TRIGGER",
    "stockName": "스톤브릿지벤처스",
    "comment": "수요예측일이 변경되었습니다. (2022-02-09 ~ 2022-02-10) - 외 3건",
    "commentList": [
      "수요예측일이 변경되었습니다. (2022-02-09 ~ 2022-02-10)",
      "공모가 밴드가 변경되었습니다. (9000원 ~ 10500원)",
      "영업이익 값이 정정되었습니다. 22360688445",
      "매출액 값이 정정되었습니다.31251538408"
    ],
    "registDate": "2022-05-07 20:15:05"
}

0.0.5

07 May 13:43
Compare
Choose a tag to compare
0.0.5 Pre-release
Pre-release

API 서비스

  • IPO 상세 조회 (ipo/{ipo_index})
    • 더 이상 underwriter 값을 가져오지 않습니다.
    • 주간사 이름은 ipo list에서만 조회되며, 상세페이지에서는 ipo/underwriter api를 이용하거나, 통합조회를 진행해야합니다.
    • 수요예측일을 시작/종료일 2개로 구분합니다.
      • 반환값이 기존 ipo_forecast_date 에서 ipo_forecast_start , ipo_forecast_end 로 변경되었습니다.
    • 실권주에 확정공모가가 아직 없는 경우, 확정이전가격(ipo_price_high)을 확정공모가로 반환합니다. (IpoDto)
  • IPO LIST (ipo)
    • 이제 recent_comment가 출력됩니다. (가장 최근 코멘트)
    • 해당 로직은 임시로 작성되었으며 추후 변경 예정 (속도가 너무 느려 Mapper측으로 전환필요)

Util

  • jsonCommentConverter
    • json 형태의 comment(log)를 해석하여 반환하는 유틸리티 코드

TDD

  • jsonCommentConverter에 대해 일부 TDD 적용

0.0.4

14 Apr 15:39
Compare
Choose a tag to compare
0.0.4 Pre-release
Pre-release
  • 요약 : 미리 알고있는 주간사명을 일관성있게 출력하도록 수정 및 관리자페이지 작성중

API 서비스

  • ipo list, ipo, ipo underwriter
    • 주간사명 조회시 underwriter_code 테이블을 join하여 치환된명으로 일관성 있게 출력함.
    • 단, underwriter_code 테이블에 등록되어있지 않은 주간사명은 기존 입력값대로 출력.

관리자페이지

  • ipo list 및 detail 일부 조회가능하도록 작성.
  • 개발pc에서는 정상 실행되지만, server측에서는 작동하지않음. 확인필요.

0.0.3

10 Apr 04:45
Compare
Choose a tag to compare
0.0.3 Pre-release
Pre-release

요약 : IPO 관련 데이터 표현 수정 및 Swagger 설명일부 수정

API 서비스

  • IPO List
    • 리스트 출력 순서 ipo_start_date 기준으로 변경(임시).
      • 현재 limit으로 100개 제한하는 상황으로, 임시로 설정 후 정상 서비스시 다시 ipo_index 기준으로 변경필요
      • ORDER BY ipo.ipo_start_date DESC
    • 주간사 항목 출력 시. Query에서 Order By (group_contact)
      • GROUP_CONCAT(iu.under_name ORDER BY iu.ind_total_max DESC) AS underwriter
    • 스팩주 구분하기. (DB출력시 이름으로 판단) - 추후에는 DB에서 Trigger 처리?
      • IF(INSTR(stock_name,'스팩')=0, stock_kinds, '스팩주') AS stock_kinds
  • IPO / IPO Detail
    • 스팩주 구분하기. 위와 동일.

0.0.2

31 Mar 15:42
Compare
Choose a tag to compare
0.0.2 Pre-release
Pre-release

요약 : 달력(스케줄) 조회 기능 추가, 변경이력(Comment/History) 페이징 처리, IPO 목록에서 주간사 보이지 않던 문제 수정

API

/api/v1/ipo/schedule

  • 달력(스케줄) 조회 기능 추가
  • 조회 시작일자(String), 조회 종료일자(String)을 인자값으로 주면 해당 기간내에 일정을 모두 가져옴.
  • 날짜 형식(Format)은 0000-00-00
  • CURL
curl -X 'GET' \
  'http://test.dbsg.co.kr:8080/api/v1/ipo/schedule?startDate=2022-01-01&endDate=2022-03-01' \
  -H 'accept: */*'

Untitled

  • 출력 예시
[
  {
    "ipoIndex": 7,
    "stockName": "테스트 공모시작이전",
    "ipoForecastDate": "2022-01-01",
    "ipoStartDate": "2022-06-01",
    "ipoEndDate": "2022-06-02",
    "ipoRefundDate": "2022-06-03",
    "ipoDebutDate": "2022-06-04"
  },
  {
    "ipoIndex": 8,
    "stockName": "테스트 공모진행중",
    "ipoForecastDate": "2022-01-01",
    "ipoStartDate": "2022-01-02",
    "ipoEndDate": "2022-06-01",
    "ipoRefundDate": "2022-06-02",
    "ipoDebutDate": "2022-06-03"
  },
...
  {
    "ipoIndex": 53,
    "stockName": "오리엔트정공",
    "ipoForecastDate": "2022-01-05",
    "ipoStartDate": "2022-01-10",
    "ipoEndDate": "2022-01-11",
    "ipoRefundDate": "2022-01-14",
    "ipoDebutDate": null
  }
]

/api/v1/ipo/comme

  • Comment 페이지 단위 조회 추가
  • page(페이지번호), num(페이지당 게시물수)를 인자값으로 전체 Comment 조회 가능
  • num의 경우 필수입력값은 아니며, 입력하지 않을 시 기본값은 20으로 지정되어있음.
  • CURL
curl -X 'GET' \
  'http://test.dbsg.co.kr:8080/api/v1/ipo/comment?page=1&num=20' \
  -H 'accept: */*'

Untitled

  • 출력 예시
[
  {
    "commentIndex": 4,
    "ipoIndex": 7,
    "stockName": "테스트 공모시작이전",
    "comment": "우널기우널기우널기우널기우널기",
    "writer": "admin",
    "registDate": "2022-02-10 01:11:58"
  },
  {
    "commentIndex": 3,
    "ipoIndex": 6,
    "stockName": "테스트 수요예측이전",
    "comment": "00월00일이 상장일입니다.",
    "writer": "admin",
    "registDate": "2022-02-10 01:11:12"
  },
  {
    "commentIndex": 2,
    "ipoIndex": 6,
    "stockName": "테스트 수요예측이전",
    "comment": "테스트코멘트2",
    "writer": "batch",
    "registDate": "2022-02-10 01:10:56"
  },
  {
    "commentIndex": 1,
    "ipoIndex": 6,
    "stockName": "테스트 수요예측이전",
    "comment": "테스트코멘트입니다.",
    "writer": "admin",
    "registDate": "2022-02-10 01:10:39"
  }
]

/api/v1/ipo

  • IPO 목록(전체 List)에서 underwriter 확인 수정 (서브 쿼리 조인 형태)
  • 주간사 배정수량별로 내림차순 정렬 필요
  • 출력 예시
[
  {
    "ipoIndex": 71,
    "stockName": "카카오페이",
    "stockExchange": "코스피",
    "stockKinds": "공모주",
    "ipoStartDate": "2021-10-25",
    "ipoEndDate": "2021-10-26",
    "ipoRefundDate": "2021-10-28",
    "ipoDebutDate": null,
    "underwriter": "\n대신증권㈜\n,\n한국투자증권㈜\n,삼성증권㈜",
    "tag": null,
    "recentComment": null
  },

...
]

0.0.1

10 Mar 06:56
Compare
Choose a tag to compare
0.0.1 Pre-release
Pre-release

수정사항

API

/api/v1/ipo

  • 아래 수정사항 모두 포함

/api/v1/ipo/detail/{ipoIndex}

  • 데이터 형식 수정 : stockCode와 dartCode에 데이터 타입을 기존 Int에서 Varchar(String)으로 수정
  • 항목명 변경 : sectorCode를 sector로 변경 (String으로 수정)
  • 항목 추가 : numberOfIpoShares (Int) 항목 추가
  • 출력 예시
{
  "ipoIndex": 4,
  "stockName": "래몽래인",
  ...
  "stockCode": "200350",
  "dartCode": "00990819",
  "sector": "업종명",
  ...
  "numberOfIpoShares": 0,
  ...
}

/api/v1/ipo/underwriter/{ipoIndex}

  • 반환 형식 수정 : DB구조 변경에 따른 반환 형식 수정.
  • 출력 예시
[
  {
    "ipoIndex": 7,
    "updateDate": null,
    "underName": "ibk투자증권",
    "indTotalMax": 111111,
    "indTotalMin": 11111,
    "indCanMax": 1111,
    "indCanMin": 111
  },
  {
    "ipoIndex": 7,
    "updateDate": null,
    "underName": "kb금융증권",
    "indTotalMax": 123,
    "indTotalMin": 12,
    "indCanMax": 12,
    "indCanMin": 1
  },
  {
    "ipoIndex": 7,
    "updateDate": null,
    "underName": "신한투자증권",
    "indTotalMax": 5,
    "indTotalMin": 4,
    "indCanMax": 3,
    "indCanMin": 2
  }
]