Giter Site home page Giter Site logo

ai_funding_be's Introduction

AI_Funding_BE

소개

투자의 비서 (ToBI) 는 AI를 통해 주식투자를 추천해주는 프로그램입니다.

설치

git clone https://github.com/AI-Funding/AI_Funding_BE.git

⚒ 기술 스택

분류 사용 언어 및 기술
언어 Java 11
웹 앱 프레임워크 Spring, Spring Security, Sprint Boot, JPA, Lombok
데이터베이스 MySQL
버전관리 툴 Git, Github
IDE IntelliJ
협업 관리 Jira, Slack, Notion
서버 Aws EC2

ai_funding_be's People

Contributors

hoseong0731 avatar jeonhyerim86 avatar jiione avatar jinseohan avatar kwyoohae avatar yusangseo avatar

Forkers

maskedmarker

ai_funding_be's Issues

홈화면 API 구현

넘겨줘야하는 목록

  • 유저 이름
  • 몇 번째 계좌인지
  • 계좌 생성일
  • 금익 수익률
  • 금익 수익금
  • 누적 수익률
  • 누적 수익금
  • 계좌 점유율 (주식 이름, 수익률)

커뮤니티 글작성 구현

구현목록

커뮤니티 글작성 구현

api주소

주소 메서드
api/community-writing POST

받는값

{
	"customer_info_id" : 1,
	"board_id"        : "게시판 id",
	"title"            : "주제",
	"content"          : "내용"
}

넘겨주는값

{
	"success" : "성공여부"
}

DTO Json 파싱 문제

현재 다음과 같이 LocalDateTime 을 가지는 인스턴스 변수가 있다면 Json으로 넘겨줄때 다음과 같은 오류가 나오는 것을 확인했습니다.

private LocalDateTime createAt;

image

하지만 다음처럼 원래는 파싱되어야합니다.

image

이 오류를 고치기 위해서는 다음과 같이 @JsonFormat 어노테이션을 사용해서 포맷을 사용하면 해결되는 것을 확인하였습니다.

@JsonFormat(shape= JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS")
private LocalDateTime createAt;

다들 Postman을 통해서 확인하시고 오류 발생시 다음 어노테이션을 붙여주면 좋을것 같습니다.

로그인 기능 구현

해당 기업들의 API를 사용하여 구현할 것
또, 기본 개인 정보가 들어갈 DB 테이블 구현할 것

  • 카카오톡
  • 페이스북
  • 구글
  • 애플

기타 더 필요한 연동들 추가할 것.
이중 API 문서 찾아보고 하나만 먼저 만들고 천천히 다른 것들도 연동하는 방향으로 진행

관련 PR (해당 이슈 PR 등록 후 #5 이런식으로 Comment에 달아줄 것. "#"을 입력하면 해당 이슈 찾을 수 있음)

관련 문서들
카카오톡: https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api
페이스북: https://developers.facebook.com/
구글: https://tyrannocoding.tistory.com/51
애플: https://tyrannocoding.tistory.com/66

MVC 패턴에 맞도록 디렉토리 구축

Model
View (FE 레포지토리로 이관)
Control
폴더로 나누고 더 필요한 폴더를 추가할 것
예) 쿼리를 모아두는 Query 폴더
=> ORM을 사용하든 String Builder에 쿼리를 하드코딩하든 해야할 것 같음
예2) API 관련 JSON 토큰 값들 모아두는 폴더
예3) Handler class 들을 모아두는 폴더
=> DB Handler, DataTable Handler 기타 등등 앞으로 개발하면서 많이 사용할 것 같은 Handler들을 모아두는 폴더

수익상세 탭 구현

구현목록

계좌별 수익률 및 손익금 상세내용에 대한 수익확인 탭을 구현

api주소

주소 메서드
api/profit-check POST

받는값

{
	"customer_info_id" : "1",
	"login_type"       : "00"
}

넘겨주는값

{
	"accountNumber" : "계좌개수"
	"account" : [
		{
			"aiType"             : "투자 AI 타입"
			"accountName"        : "계좌 이름",
			"todayTotalBalance"  : "총 평가 금액",
			"totalProfitPersent" : "총 손익금 (퍼센트)",
			"totalProfitWon"     : "총 손익금 (원₩)",
			"todayProfitWon"     : "하루 손익금(원₩)",
			"todayProfitPersent" : "하루 수익률(퍼센트)"
			"profitDetail" : [
				{
					"creatAtProfitPersent"  : "해당일 손익금(퍼센트)",
					"creatAtProfitWon"      : "해당일 손익금(원₩)",
					"createAt"               : "해당 날짜"
				},
				{
					"creatAtProfitPersent"  : "해당일 손익금(퍼센트)",
					"creatAtProfitWon"      : "해당일 손익금(원₩)",
					"createAt"               : "해당 날짜"
				},
				{
					"creatAtProfitPersent"  : "해당일 손익금(퍼센트)",
					"creatAtProfitWon"      : "해당일 손익금(원₩)",
					"createAt"               : "해당 날짜"
				},
			],
			"createAt" : "계좌생성일",
			"stockList" : [
				{
					"stockName" : "주식이름",
					"stockPercent" : "주식비중",
				},
				{
					"stockName" : "주식이름",
					"stockPercent" : "주식비중",
				},
				{
					"stockName" : "주식이름",
					"stockPercent" : "주식비중",
				},
			]
		} 
	]
}

주식 시세 가져오기 구현

크롤링 혹은 증권사 API를 통해서 주식시세를 가져오는 것을 목표로합니다.

가져오면 저장을 한다면 DB에 대해서 설계 또한 해야할 필요성을 느낍니다.

- [ ] Jsoup을 통한 네이버 주식 크롤링

  • 증권사 API를 통한 데이터 가져오기

파일을 어떤식으로 가져오고 저장을 어떤식으로 하는지 결정을 해야할 것 같습니다.

수익비교탭 구현

구현목록

수익비교 탭 구현

api주소

주소 메서드
api/profit-compare POST

받는값

{
	"customer_info_id" : "1",
	"login_type"       : "00"
}

넘겨주는값

{
	"accounts" : [
		{
			"aiType" : "ai번호"
			"nickname" : "계좌이름"
			"accountNumber" : "계좌번호"
			"profits" : [
				{
					"date"		: "누적수익률 날짜"
					"profit"	: "누적수익률"
				},
				{
					"date"		: "누적수익률 날짜"
					"profit"	: "누적수익률"
				},
				{
					"date"		: "누적수익률 날짜"
					"profit"	: "누적수익률"
				},
				{
					"date"		: "누적수익률 날짜"
					"profit"	: "누적수익률"
				},
			]
		},
		{
			"aiType" : "ai번호"
			"nickname" : "계좌이름"
			"accountNumber" : "계좌번호"
			"profits" : [
				{
					"date"		: "누적수익률 날짜"
					"profit"	: "누적수익률"
				},
				{
					"date"		: "누적수익률 날짜"
					"profit"	: "누적수익률"
				},
				{
					"date"		: "누적수익률 날짜"
					"profit"	: "누적수익률"
				},
				{
					"date"		: "누적수익률 날짜"
					"profit"	: "누적수익률"
				},
			]
		},
	]
}

주식 넘겨받는 것에 대한 API 개발

Response 값

{
	"stockInfo" : [
		
	"stockName" : "종목이름",
	"tradeSignal" : int(0,1,2),
	"tradeAmount" : 종목의 사는양
	],
	[
		"stockName" : "종목이름",
		"tradeSignal" : int(0,1,2),
		"tradeAmount" : 종목의 사는양 
	]
}

이때 tradeSignal의 값은 다음과 같습니다.

  • 0 : 매수
  • 1 : 매도
  • 2 : 홀드

구현할 기능

이 값들에 대해서 구현할 기능은 다음과 같습니다.

  • API를 받을 시에 모든 계좌에 대해서 매수 매도 시그널에 따른 결과 확인

필요한 handler 구축

구현 내용

  • DB Handler
  • NetWork Handler
  • Json Token Handler

기타 등등...
필요할 것 같은 handler들 Comment로 추가한 이후 Handler 하나당 PR 하나로 해서 작업하기

테이블별 관련 Entity 작성

테이블 별로 관련한 Entity를 작성하려고 합니다.

  • customer_info
  • device
  • account_detail
  • account_stock_detail
  • trading_detail
  • subscribe
  • stock
  • stock_price_by_day
  • 공지사항
  • 커뮤니티
  • 댓글
  • 뱃지
  • 뱃지종류
  • 수익률

AI소개 현재종목 거래내역 탭 구현

  • <AI 소개탭>
    1. AI 소개하는 내용
  • <현재 종목>
    1. 이 계정이 보유하고 있는 종목
    1. 각 종목의 현재가, 등락률, 전일비
    1. 각 종목의 상세 그래프 정보
  • <거래 내역>
    1. 이 계정의 거래내역 1,3,6개월 단위
    1. 각 거래내역의 거래종류, 거래수량, 단가, 매수가

프론트로 넘기기 위한 API 구현

홈 화면

  • 가상 계좌 생성 API (CRD)
  • 고객 정보 조회 API (READ)
    • 계좌 현재 금액
    • 계좌 수익률
    • 계좌 누적수익금
    • 계좌 생성일
    • 이름

현재종목

  • 계좌 조회 API (R)
    • 현재 종목 가격
    • 수익률
    • 종목이름

현재 종목 세부

  • 계좌 조회 API (R)
    • 이전까지 모든 매매기록

커뮤니티의 게시글에 대한 댓글 구현

구현목록

게시글에 대한 댓글작성

api주소

주소 메서드
api/community-comment POST

받는값

{
	"customer_info_id" : "1"
	"board_id"         : "게시물타입"
	"parent_id"        : "부모게시글 사용자 id"
	"post_id"          : "게시글 id"
	"content"          : "내용"
}

넘겨주는값

{
	"success" : "성공여부"
}

커뮤니티 잡담 탭 구현

구현목록

커뮤니티 잡담 탭 구현

api주소

주소 메서드
api/community-chat POST

받는값

{
	"customer_info_id" : "1",
	"login_type"       : "00"
}

넘겨주는값

{
	"isMember" : "회원인증 성공여부"
	"hotId" : "hot 게시글 id"
	"hotTitle" : "hot 게시글 제목"
	"hotDate" : "hot 게시글 작성날짜"
	"hotHeartNum" : "hot 게시글 하트수"
	"hotCommentNum" : "hot 댓글 개수"
	"hotContent" : "hot 게시글 내용"
	"hotWriter" : "hot 게시글 작성자"
	"hotComments" : [
				{
					"commentWriter" : "이름"
					"commentContent" : "댓글내용"
					"commentDate" : "댓글날짜"
					"commentHeartNum" : "댓글좋아요수"
				},
	]
	"board" : [
		{
			"id" : "게시글 id"
			"title" : "글 제목"
			"date" : "작성날짜"
			"heartNum" : "하트수"
			"commentNum" : "댓글개수"
			"content" : "내용"
			"writer" : "작성자"
			"comments" : [
				{
					"commentWriter" : "이름"
					"commentContent" : "댓글내용"
					"commentDate" : "댓글날짜"
					"commentHeartNum" : "댓글좋아요수"
				},
				{
					"commentWriter" : "이름"
					"commentContent" : "댓글내용"
					"commentDate" : "댓글날짜"
					"commentHeartNum" : "댓글좋아요수"
				}
			]
		},
		{
			"id" : "게시글 id"
			"title" : "글 제목"
			"date" : "작성날짜"
			"heartNum" : "하트수"
			"commentNum" : "댓글개수"
			"content" : "내용"
			"writer" : "작성자"
			"comments" : [
				{
					"commentWriter" : "이름"
					"commentContent" : "댓글내용"
					"commentDate" : "댓글날짜"
					"commentHeartNum" : "댓글좋아요수"
				},
				{
					"commentWriter" : "이름"
					"commentContent" : "댓글내용"
					"commentDate" : "댓글날짜"
					"commentHeartNum" : "댓글좋아요수"
				}
			]
		},
	]	
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.