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

토스페이 심사용 #45

Merged
merged 102 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
6a7d9ab
Feat: KakaoOAuth 기능 추가
1223v Nov 13, 2023
4403a89
Merge pull request #9 from 1223v/security
1223v Nov 13, 2023
7c4c9b4
Config: properties에 toss 추가
Nov 13, 2023
7a532f9
Config: JPA 자동 입력 설정
marinesnow34 Nov 13, 2023
18170a2
Feat: Payment관련 dto 추가
marinesnow34 Nov 13, 2023
7014cb4
Feat: req, res 추가
marinesnow34 Nov 13, 2023
21e6f33
Config: toss config 추가
marinesnow34 Nov 13, 2023
033d7b1
Feat: 결제 로직 구현
marinesnow34 Nov 13, 2023
c748fee
Merge pull request #10 from marinesnow34/tossPay
marinesnow34 Nov 13, 2023
60f9662
Feat: DB 엔티티 추가
1223v Nov 13, 2023
c32693d
Config: properties redirect url추가
1223v Nov 13, 2023
c3b3d61
Merge branch 'test' into domain
1223v Nov 13, 2023
9302275
Merge pull request #11 from 1223v/domain
1223v Nov 13, 2023
1f02ab3
Fix: 가게, 장바구니, 식품 BaseTimeEntity 상속 수정
1223v Nov 14, 2023
2045549
Config: 예외 처리 코드 추가
marinesnow34 Nov 15, 2023
8fa01ec
Feat: 가게 상세 정보 구현
marinesnow34 Nov 15, 2023
56b23d8
Merge pull request #12 from 1223v/test
marinesnow34 Nov 15, 2023
9255c7e
Merge pull request #13 from marinesnow34/store
marinesnow34 Nov 15, 2023
ccdd54c
Config: 메뉴 카테고리 추가
marinesnow34 Nov 15, 2023
b0396d7
Feat: 메뉴 관련 dto 추가
marinesnow34 Nov 15, 2023
a3a923d
Feat: 메뉴 조회 구현
marinesnow34 Nov 15, 2023
9d1cef0
Merge pull request #14 from marinesnow34/store_detail
marinesnow34 Nov 15, 2023
d958b31
Config: 테이블 이름 단수로 변경
marinesnow34 Nov 15, 2023
070d832
Merge pull request #15 from marinesnow34/test
marinesnow34 Nov 15, 2023
8904423
Config: 공통 상수 추가
marinesnow34 Nov 15, 2023
86b559b
Config: 예외 추가
marinesnow34 Nov 15, 2023
c03c97d
Feat: 식음료 dto 추가
marinesnow34 Nov 15, 2023
e318137
Feat: 식음료 레포 추가
marinesnow34 Nov 15, 2023
d1d39b1
Feat: 식음료 옵션 확인 구현
marinesnow34 Nov 15, 2023
59a3c8e
Merge pull request #16 from marinesnow34/option
marinesnow34 Nov 15, 2023
657592a
Feat: 유저 정보 조회 API 추가
1223v Nov 15, 2023
7a82c8f
Merge branch 'test' into domain
1223v Nov 15, 2023
d456527
Merge pull request #17 from 1223v/domain
1223v Nov 15, 2023
68305d0
Fix: 유저 AuthenticationPrincipal id 기능 조회로 변경
1223v Nov 16, 2023
074d284
Fix: 유저 ì• 유저 조회„이디 조회로 변경
1223v Nov 16, 2023
d8918c7
Merge pull request #18 from 1223v/api
1223v Nov 17, 2023
03a0468
Config: cart 삭제, 주문 추가
marinesnow34 Nov 17, 2023
a553489
Fix: 유저 인증체크 API 변경. DB 조회 X
1223v Nov 17, 2023
e3210d5
Merge pull request #19 from 1223v/api
1223v Nov 17, 2023
0c60359
Feat: 로그아웃 API 기능 추가. RT만 삭제 -> AT는 클라이언트에서 삭제
1223v Nov 17, 2023
4c516af
Merge pull request #20 from 1223v/test
1223v Nov 17, 2023
69a472c
Config: table생성 안하기
marinesnow34 Nov 17, 2023
7bd1c6f
Config: domain 수정
marinesnow34 Nov 17, 2023
cc93fd1
Feat: dto 생성
marinesnow34 Nov 17, 2023
dabacc0
Feat: 장바구니 추가 구현
marinesnow34 Nov 17, 2023
937fa5b
Merge pull request #21 from marinesnow34/cart
marinesnow34 Nov 17, 2023
148c44c
Feat: dto 추가
marinesnow34 Nov 17, 2023
38a9db3
Config: domain 수정
marinesnow34 Nov 17, 2023
fe0c7d9
Feat: 음료 수량 변경 구현
marinesnow34 Nov 17, 2023
adb1bc1
Merge pull request #22 from marinesnow34/cart
marinesnow34 Nov 17, 2023
658e5f9
Feat: 쿠폰 및 쿠폰 메뉴, 이벤트 엔티티 추가
1223v Nov 17, 2023
aa4410a
Fix: Foodie @Builder 에러 수정
1223v Nov 17, 2023
8f54587
Merge branch 'readyvery:test' into test
1223v Nov 17, 2023
29db2cc
Merge pull request #24 from 1223v/test
marinesnow34 Nov 17, 2023
05286aa
Config: domain 수정
marinesnow34 Nov 17, 2023
54f6b69
Feat: dto 추가
marinesnow34 Nov 17, 2023
ce6d691
Feat: 장바구니 아이템 삭제 구현
marinesnow34 Nov 17, 2023
6612270
Merge pull request #25 from marinesnow34/cartDel
marinesnow34 Nov 17, 2023
eeeb3e8
Config: dto 추가
marinesnow34 Nov 19, 2023
9aff897
Feat: 장바구니 삭제 구현
marinesnow34 Nov 19, 2023
26693d8
Fix: 장바구니 다른 가게 아이템 추가시 오류 구현
marinesnow34 Nov 19, 2023
fcb59e8
Merge pull request #26 from marinesnow34/cartReset
marinesnow34 Nov 19, 2023
bf22bb7
Config: dto 추가
marinesnow34 Nov 19, 2023
9952470
Feat: 장바구니 조회 구현
marinesnow34 Nov 19, 2023
6d0027a
Merge pull request #27 from marinesnow34/cartGet
marinesnow34 Nov 19, 2023
b9fb5d0
Fix: Oauth 연령, 생일, 전화번호 추가
1223v Nov 19, 2023
672b236
Merge pull request #28 from 1223v/oauth
1223v Nov 19, 2023
8ad8189
Fix: Oauth 생일 수정
1223v Nov 19, 2023
bb3f44a
Merge pull request #29 from 1223v/oauth
1223v Nov 19, 2023
722cbe3
Fix: Cors 허용 헤더 추가
1223v Nov 19, 2023
f1d8af2
Merge pull request #30 from 1223v/test
1223v Nov 19, 2023
7b46846
Feat: 토스 주문 요청 결제 ID 생성 구현
marinesnow34 Nov 19, 2023
8169e9b
Merge pull request #31 from marinesnow34/payment
marinesnow34 Nov 19, 2023
40d2b03
Fix: Cors 허용 헤더 추가
1223v Nov 19, 2023
a4f0f4a
Fix: 서드파티 쿠키 추가
1223v Nov 19, 2023
bcdab6b
Merge pull request #32 from 1223v/test
1223v Nov 19, 2023
d8ec9c4
Fix: 서드파티 쿠키 삭제
1223v Nov 19, 2023
9434cd3
Merge pull request #33 from 1223v/test
1223v Nov 19, 2023
4225d80
Config: dto 추가
marinesnow34 Nov 20, 2023
b252f7d
Feat: 결제 성공 구현
marinesnow34 Nov 20, 2023
160a296
Merge pull request #34 from marinesnow34/payAllow
marinesnow34 Nov 20, 2023
4cbe842
Fix: 주문 상세 삭제
marinesnow34 Nov 20, 2023
dcd719e
Merge pull request #35 from marinesnow34/fix
marinesnow34 Nov 20, 2023
64bad28
Fix: 결제 요청 가게 정보는 방법 변경
marinesnow34 Nov 20, 2023
ba95175
Fix: 리퀘스트에서 스토어 제거
marinesnow34 Nov 20, 2023
9299764
Merge pull request #36 from marinesnow34/test
marinesnow34 Nov 20, 2023
1063df0
Feat: 가게 리스트 및 가게 검색 기능 추가
1223v Nov 20, 2023
2bc7183
Merge pull request #37 from 1223v/test
1223v Nov 20, 2023
fa6c499
Fix: store Img 에러 수정
1223v Nov 20, 2023
4f3c185
Merge pull request #38 from 1223v/test
1223v Nov 20, 2023
c404f06
Fix: security 헤더 수정
1223v Nov 20, 2023
40f776d
Merge pull request #39 from 1223v/test
1223v Nov 20, 2023
942cb18
Feat: 결제 실패 구현
marinesnow34 Nov 21, 2023
7c658a5
Merge pull request #41 from marinesnow34/fail
marinesnow34 Nov 21, 2023
67f51c5
Feat: 결제 완료 리스트 구현
marinesnow34 Nov 21, 2023
18f55da
Merge pull request #42 from marinesnow34/history
marinesnow34 Nov 21, 2023
31cafa7
Feat: 결제 상태 구현 완료
marinesnow34 Nov 21, 2023
cbf3aba
Fix: build 오류 해결
marinesnow34 Nov 21, 2023
a2fd535
Merge pull request #43 from marinesnow34/current
marinesnow34 Nov 21, 2023
76eb829
Fix: auth 200 OK로 수정
1223v Nov 21, 2023
85dd0b7
Merge branch 'test' into coupon
1223v Nov 21, 2023
0a3da5d
Merge pull request #44 from 1223v/coupon
1223v Nov 21, 2023
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
43 changes: 22 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ dependencies {
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

//Querydsl 추가
implementation 'com.querydsl:querydsl-core:5.0.0'
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'

annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"

// mysql driver
runtimeOnly 'com.mysql:mysql-connector-j'

Expand All @@ -45,9 +37,18 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'

// jwt
implementation 'com.auth0:java-jwt:4.2.1'
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'

// //Querydsl 추가
// implementation 'com.querydsl:querydsl-core:5.0.0'
// implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
//
// annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta"
// annotationProcessor "jakarta.annotation:jakarta.annotation-api"
// annotationProcessor "jakarta.persistence:jakarta.persistence-api"
}

checkstyle {
Expand All @@ -62,16 +63,16 @@ tasks.named('test') {
}


def querydslSrcDir = 'src/main/generated'

sourceSets {
main.java.srcDirs += "$projectDir/build/generated"
}

compileJava {
options.compilerArgs << '-Aquerydsl.generatedAnnotationClass=javax.annotation.Generated'
}

clean {
delete file(querydslSrcDir)
}
//def querydslSrcDir = 'src/main/generated'
//
//sourceSets {
// main.java.srcDirs += "$projectDir/build/generated"
//}
//
//compileJava {
// options.compilerArgs << '-Aquerydsl.generatedAnnotationClass=javax.annotation.Generated'
//}
//
//clean {
// delete file(querydslSrcDir)
//}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;

@EnableJpaAuditing
@SpringBootApplication
public class ReadyverydemoApplication {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.readyvery.readyverydemo.domain;

import java.time.LocalDateTime;

import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import jakarta.persistence.Column;
import jakarta.persistence.EntityListeners;
import jakarta.persistence.MappedSuperclass;
import lombok.Getter;
import lombok.Setter;

@EntityListeners(AuditingEntityListener.class)
@MappedSuperclass
@Getter
@Setter
public class BaseTimeEntity {

@CreatedDate
@Column(name = "created_at")
private LocalDateTime createdAt;

@LastModifiedDate
@Column(name = "last_modified_at")
private LocalDateTime lastModifiedAt;
}
68 changes: 68 additions & 0 deletions src/main/java/com/readyvery/readyverydemo/domain/Cart.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package com.readyvery.readyverydemo.domain;

import java.util.ArrayList;
import java.util.List;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToMany;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Entity
@Table(name = "CART")
@AllArgsConstructor
@Slf4j
@Builder
@Setter
public class Cart extends BaseTimeEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "cart_idx")
private Long id;

// 장바구니 유저 연관관계 매핑

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_idx")
private UserInfo userInfo;

// 장바구니 가게 연관관계 매핑
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "store_idx")
private Store store;

@Column
@Builder.Default
private Boolean isOrdered = false;

@Column
@Builder.Default
private Boolean isDeleted = false;

@OneToOne(mappedBy = "cart")
private Order order;

// 장바구니 장바구니 아이템 연관관계 매핑
@Builder.Default
@OneToMany(mappedBy = "cart", cascade = CascadeType.ALL)
private List<CartItem> cartItems = new ArrayList<CartItem>();

}
64 changes: 64 additions & 0 deletions src/main/java/com/readyvery/readyverydemo/domain/CartItem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package com.readyvery.readyverydemo.domain;

import java.util.ArrayList;
import java.util.List;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Entity
@Table(name = "CART_ITEM")
@AllArgsConstructor
@Slf4j
@Builder
@Setter
public class CartItem extends BaseTimeEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "cart_item_idx")
private Long id;

// 장바구니 아이템 수량
@Column(nullable = false)
private Long count;

// 장바구니 메뉴 연관관계 매핑"
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "foodie_idx")
private Foodie foodie;

// 장바구니 아이템 장바구니 연관관계 매핑
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "cart_idx")
private Cart cart;

// 장바구니 아이템 삭제 여부
@Column(columnDefinition = "BOOLEAN default true")
@Builder.Default
private Boolean isDeleted = false;

// 장바구니 아이템 - 장바구니 옵션 연관관계 매핑
@Builder.Default
@OneToMany(mappedBy = "cartItem", cascade = CascadeType.ALL)
private List<CartOption> cartOptions = new ArrayList<CartOption>();

}
47 changes: 47 additions & 0 deletions src/main/java/com/readyvery/readyverydemo/domain/CartOption.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.readyvery.readyverydemo.domain;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Entity
@Table(name = "CART_OPTION")
@AllArgsConstructor
@Slf4j
@Builder
public class CartOption extends BaseTimeEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "cart_option_idx")
private Long id;

// 장바구니 옵션 - 메뉴 옵션 연관관계 매핑
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "foodie_option_idx")
private FoodieOption foodieOption;

// 장바구니 옵션 - 장바구니 아이템 연관관계 매핑
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "cart_item_idx")
private CartItem cartItem;

// 장바구니 옵션 - 메뉴 카테고리 옵션 연관관계 매핑
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "foodie_option_category_idx")
private FoodieOptionCategory foodieOptionCategory;

}
93 changes: 93 additions & 0 deletions src/main/java/com/readyvery/readyverydemo/domain/CeoInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
package com.readyvery.readyverydemo.domain;

import static jakarta.persistence.FetchType.*;

import java.time.LocalDateTime;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.OneToOne;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Getter
@Entity
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "CEO")
@Slf4j
public class CeoInfo extends BaseTimeEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "ceo_idx")
private Long id;

// 이메일
@Column(nullable = false, length = 45)
private String email;

// 닉네임
@Column(nullable = false)
private String nickName;

// 프로필 이미지
@Column(nullable = false, columnDefinition = "TEXT")
private String imageUrl;

// 연령대
@Column
private String age;

// 생일
@Column(nullable = false)
private String birth;

// 전화번호
@Column(nullable = false)
private String phone;

// 계좌번호
@Column
private String accountNumber;

// 소셜 로그인 타입
@Column(nullable = false)
@Enumerated(EnumType.STRING)
private SocialType socialType; // KAKAO, NAVER, GOOGLE

// 소셜 로그인 타입의 식별자 값 (일반 로그인인 경우 null)
@Column(nullable = false)
private String socialId; // 로그인한 소셜 타입의 식별자 값 (일반 로그인인 경우 null)

// 유저 상태
@Column(nullable = false, columnDefinition = "BOOLEAN default true")
private boolean status;

// 리프레시 토큰
@Column(columnDefinition = "TEXT")
private String refreshToken;

// 계정 삭제 요청일
@Column
private LocalDateTime deleteDate;

// 마지막 로그인 일시
@Column
private LocalDateTime lastLoginDate;

// 사장님 가게 연관관계 매핑
@OneToOne(mappedBy = "ceoInfo", fetch = LAZY)
private Store store;

}
Loading