Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #22

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Main #22

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
73 changes: 73 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# 뉴닉 클론 코딩

<a href="https://newneek.co" target="_blank"> NewNeek </a>

최신 기사를 읽고, 뉴스레터를 구독해서 뉴스레터를 이메일로 받아볼 수 있는 사이트입니다.

### 팀원
#### Front-end
+ 이도영
+ 손규리
+ 김혜경

#### Back-end
| 팀원 | github |
|:---:|:---:|
|최서림|https://github.com/Bebeqwer|
|김민규|https://github.com/kmg159753|
|김정빈|https://github.com/000vin000|
|권능현|https://github.com/NHclub|
|김예진|https://github.com/dpwls8364|

### Communication
<img src="https://img.shields.io/badge/notion-000000?style=flat&logo=notion&logoColor=white">
<a href="https://www.notion.so/Team3-NEWNEEK-Clone-Coding-ba274ad8be504cbfba203b9848809228" target="_blank"> Notion : NewNeek Clone Coding Team3 </a>

<a href="https://www.notion.so/Backend-a200eb612ed04901870678189054913b" target="_blank"> Notion : Back-end </a>

----

# 프로젝트 설명
![image](https://github.com/Team3-NEWNEEK-Clone-Coding/BE/assets/65941341/37553f5c-5a0f-45c5-a13a-000d5836674e)



#### 개발기간
2023-07-21 ~ 2023-07-27


### 프로젝트 기능
1. 회원가입 / 로그인
3. 뉴스 기사 크롤링
4. 뉴스 검색
5. 뉴스 카테고리 분류
6. 뉴스 해시태그
7. 뉴스 해시태그 검색
8. 뉴스 기사에 좋아요 누르기
9. 이메일로 뉴스레터 구독하기
10. 뉴스레터 받기


# 기술 스택
### Front-end
<a href="https://github.com/Team3-NEWNEEK-Clone-Coding/FE.git" target="_blank"> Front-end </a>

<br>

### Back-end
#### Environment
<img src="https://img.shields.io/badge/intelliJ-000000?style=flat&logo=intellijidea&logoColor=white">


#### Development
<img src="https://img.shields.io/badge/springboot-6DB33F?style=flat&logo=springboot&logoColor=white"> <img src="https://img.shields.io/badge/mysql-4479A1?style=flat&logo=mysql&logoColor=white">
<img src="https://img.shields.io/badge/springsecurity-6DB33F?style=flat&logo=springsecurity&logoColor=white"> <img src="https://img.shields.io/badge/ubuntu-E95420?style=flat&logo=ubuntu&logoColor=white">

#### Distribution - CI / CD
<img src="https://img.shields.io/badge/AmazonAWS-FF9900?style=flat&logo=amazonaws&logoColor=white"> <img src="https://img.shields.io/badge/AmazonS3-569A31?style=flat&logo=amazons3&logoColor=white"> <img src="https://img.shields.io/badge/AmazonEC2-FF9900?style=flat&logo=amazonec2&logoColor=white"> <img src="https://img.shields.io/badge/AmazonRDS-527FFF?style=flat&logo=amazonrds&logoColor=white"> <img src="https://img.shields.io/badge/GithubActions-2088FF?style=flat&logo=githubactions&logoColor=white">

----

### ERD
<img src="https://github.com/Team3-NEWNEEK-Clone-Coding/BE/assets/65941341/ed6163ce-007a-4ba7-bfa6-c6c24d4d36af">

Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public Map<String, Object> SearchNews(String keyword, int page,
Map<String, Object> response = new HashMap<>();
List<NewsResponseDto> newsResponseDtoList = newsListByCategory.stream().map(NewsResponseDto::new).collect(Collectors.toList());

int totalNewsCount = newsRepository.countSearchNewsByKeyWordNativeVer("+"+keyword+"*");
int totalNewsCount = newsRepository.countSearchNewsByKeyWordNativeVer("+"+ keyword + "*");
int totalPages = (int) Math.ceil((double) totalNewsCount / size);
response.put("totalPages", totalPages);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.example.newnique.newsletter.service;

import com.example.newnique.news.entity.News;
import com.example.newnique.news.repository.NewsRepository;
import com.example.newnique.newsletter.dto.Maildto;
import com.example.newnique.newsletter.dto.SubscriptionRequestDto;
import com.example.newnique.newsletter.entity.Subscription;
Expand All @@ -14,13 +16,15 @@
public class SubscriptionService {

private final SubscriptionRepository subscriptionRepository;
private final NewsRepository newsRepository;
private final EmailSender emailSender;
public Subscription createSub(SubscriptionRequestDto subscriptionRequestDto) throws MessagingException {
Subscription subscription = new Subscription(subscriptionRequestDto);
Subscription saveSubscription = subscriptionRepository.save(subscription);
News news = newsRepository.findTopByOrderByIdDesc();

Maildto maildto = Maildto.builder().title(subscriptionRequestDto.getNickName()+"님 환영합니다")
.message("뉴닉을 구독해주신걸 환영합니다 !")
.message("뉴닉을 구독해주신걸 환영합니다 !\n\n\n"+news.getTitle() + "\n\n\n"+news.getNewsSummary())
.toAddress(subscriptionRequestDto.getEmail()).build();
emailSender.sendMail(maildto);

Expand Down
Loading