-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
303 changed files
with
16,896 additions
and
6,166 deletions.
There are no files selected for viewing
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,14 @@ | ||
--- | ||
name: 기능 이슈 템플릿 | ||
about: 기능 개발 관련 이슈 | ||
title: '' | ||
labels: 'type: enhancement' | ||
assignees: '' | ||
|
||
--- | ||
|
||
### 상세 내용 | ||
- | ||
|
||
### 선행 작업 | ||
- |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[submodule "seller-lee-secret"] | ||
path = seller-lee-secret | ||
url = https://github.com/seller-lee/seller-lee-secret | ||
branch = master |
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,6 @@ | ||
FROM mariadb:10.5.5 | ||
|
||
ENV MYSQL_DATABASE sl_db | ||
ENV MYSQL_ROOT_PASSWORD 1234 | ||
|
||
EXPOSE 3306 |
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,11 @@ | ||
FROM openjdk:8-alpine | ||
|
||
VOLUME /tmp | ||
|
||
EXPOSE 8080 | ||
|
||
ARG JAR_FILE=back/build/libs/back-0.0.1-SNAPSHOT.jar | ||
|
||
ADD ${JAR_FILE} seller-lee-springboot.jar | ||
|
||
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dspring.profiles.active=dev","-jar","/seller-lee-springboot.jar"] |
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,8 @@ | ||
node { | ||
stage ('clone') { | ||
checkout scm | ||
} | ||
stage('build') { | ||
sh 'cd back && ./gradlew clean build' | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
#Fri Jul 24 13:34:49 KST 2020 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
ifndef::snippets[] | ||
:snippets: ../../../build/generated-snippets | ||
endif::[] | ||
:toc: preamble | ||
:toc-title: 목차 | ||
:toclevels: 2 | ||
:doctitle: 셀러리 API | ||
:author: 터틀 | ||
:email: [email protected] | ||
|
||
Doc Writer <{author} : {email}> | ||
|
||
[[resources-member]] | ||
== 회원 관리 | ||
|
||
=== 회원 로그인 | ||
|
||
operation::login[snippets='http-request,http-response,request-fields,request-body'] | ||
|
||
=== 회원 로그인 실패 | ||
|
||
==== 이메일 | ||
|
||
operation::login/advice/email[snippets='http-request,http-response,request-fields,request-body,response-body'] | ||
|
||
==== 비밀번호 | ||
|
||
operation::login/advice/password[snippets='http-request,http-response,request-fields,request-body,response-body'] | ||
|
||
[[resources-articles]] | ||
== 게시글 관리 | ||
|
||
=== 게시글 페이지 조회 | ||
|
||
operation::articles/getPage[snippets='http-request,http-response,request-parameters,response-body'] | ||
|
||
=== 게시글 상세 조회 | ||
|
||
operation::articles/get[snippets='http-request,http-response,path-parameters,request-parameters,response-body'] | ||
|
||
=== 게시글 생성 | ||
|
||
operation::articles/post[snippets='http-request,http-response,request-body,response-headers'] | ||
|
||
=== 게시글 수정 | ||
|
||
operation::articles/update[snippets='http-request,request-body'] | ||
|
||
== 채팅방 관리 | ||
|
||
=== 채팅방 생성 | ||
|
||
operation::chat-rooms/post[snippets='http-request,http-response,request-fields,request-body,response-headers'] |
This file was deleted.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
back/src/main/java/sellerlee/back/SellerLeeApplication.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,21 @@ | ||
package sellerlee.back; | ||
|
||
import java.util.TimeZone; | ||
|
||
import javax.annotation.PostConstruct; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class SellerLeeApplication { | ||
@PostConstruct | ||
void init() { | ||
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul")); | ||
} | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(SellerLeeApplication.class, args); | ||
} | ||
|
||
} |
90 changes: 90 additions & 0 deletions
90
back/src/main/java/sellerlee/back/article/application/ArticleCardResponse.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,90 @@ | ||
package sellerlee.back.article.application; | ||
|
||
import static java.util.stream.Collectors.*; | ||
|
||
import java.time.format.DateTimeFormatter; | ||
import java.util.List; | ||
import java.util.stream.IntStream; | ||
|
||
import sellerlee.back.article.domain.Article; | ||
|
||
public class ArticleCardResponse { | ||
private Long id; | ||
private String title; | ||
private Long price; | ||
private String thumbnail; | ||
private String tradeState; | ||
private long favoriteCount; | ||
private boolean favoriteState; | ||
private String createdTime; | ||
|
||
private ArticleCardResponse() { | ||
} | ||
|
||
private ArticleCardResponse(Long id, String title, Long price, String thumbnail, | ||
String tradeState, long favoriteCount, boolean favoriteState, | ||
String createdTime) { | ||
this.id = id; | ||
this.title = title; | ||
this.price = price; | ||
this.thumbnail = thumbnail; | ||
this.tradeState = tradeState; | ||
this.favoriteCount = favoriteCount; | ||
this.favoriteState = favoriteState; | ||
this.createdTime = createdTime; | ||
} | ||
|
||
public static ArticleCardResponse of(Article article, Long favoriteCount, | ||
boolean favoriteState) { | ||
return new ArticleCardResponse( | ||
article.getId(), | ||
article.getTitle(), | ||
article.getPrice(), | ||
article.getPhotos().pickThumbnail(), | ||
article.getTradeState().getTradeStateName(), | ||
favoriteCount, | ||
favoriteState, | ||
article.getCreatedTime().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME) | ||
); | ||
} | ||
|
||
public static List<ArticleCardResponse> listOf(List<Article> articles, | ||
List<Long> favoriteCounts, | ||
List<Boolean> favoriteStates) { | ||
return IntStream.range(0, articles.size()) | ||
.mapToObj(i -> of(articles.get(i), favoriteCounts.get(i), favoriteStates.get(i))) | ||
.collect(toList()); | ||
} | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public Long getPrice() { | ||
return price; | ||
} | ||
|
||
public String getThumbnail() { | ||
return thumbnail; | ||
} | ||
|
||
public String getTradeState() { | ||
return tradeState; | ||
} | ||
|
||
public long getFavoriteCount() { | ||
return favoriteCount; | ||
} | ||
|
||
public boolean isFavoriteState() { | ||
return favoriteState; | ||
} | ||
|
||
public String getCreatedTime() { | ||
return createdTime; | ||
} | ||
} |
Oops, something went wrong.