-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 게시물 상태 변경 API 구현 * feat : 좋아요, 좋아요 취소 API * feat : 상품 등록시 user-purchase 연결 추가 * 헤더 확인
- Loading branch information
1 parent
e5d4d23
commit 14524ce
Showing
16 changed files
with
299 additions
and
50 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/main/java/com/teamjo/techeermarket/domain/mypage/controller/MyPageController.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 |
---|---|---|
@@ -1,4 +1,17 @@ | ||
package com.teamjo.techeermarket.domain.mypage.controller; | ||
|
||
import com.teamjo.techeermarket.domain.mypage.service.MyPageService; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
//@RequiredArgsConstructor | ||
//@RestController | ||
//@RequestMapping("/api/mypage") | ||
public class MyPageController { | ||
|
||
|
||
|
||
} | ||
|
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
5 changes: 5 additions & 0 deletions
5
src/main/java/com/teamjo/techeermarket/domain/mypage/mapper/UserPurchaseMapper.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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
package com.teamjo.techeermarket.domain.mypage.mapper; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class UserPurchaseMapper { | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/java/com/teamjo/techeermarket/domain/mypage/repository/UserLikeRepository.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 |
---|---|---|
@@ -1,7 +1,14 @@ | ||
package com.teamjo.techeermarket.domain.mypage.repository; | ||
|
||
import com.teamjo.techeermarket.domain.mypage.entity.UserLike; | ||
import com.teamjo.techeermarket.domain.products.entity.Products; | ||
import com.teamjo.techeermarket.domain.users.entity.Users; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
import java.util.Optional; | ||
|
||
public interface UserLikeRepository extends JpaRepository<UserLike, Long> { | ||
boolean existsByUsersAndProducts(Users users, Products products); | ||
|
||
Optional<UserLike> findByUsersAndProducts(Users users, Products products); | ||
} |
4 changes: 4 additions & 0 deletions
4
src/main/java/com/teamjo/techeermarket/domain/mypage/repository/UserPurchaseRepository.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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
package com.teamjo.techeermarket.domain.mypage.repository; | ||
|
||
import com.teamjo.techeermarket.domain.mypage.entity.UserPurchase; | ||
import com.teamjo.techeermarket.domain.products.entity.Products; | ||
import com.teamjo.techeermarket.domain.users.entity.Users; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
|
||
public interface UserPurchaseRepository extends JpaRepository<UserPurchase, Long> { | ||
boolean existsBySellerIdAndProducts(Users sellerId, Products products); | ||
|
||
} | ||
|
11 changes: 11 additions & 0 deletions
11
src/main/java/com/teamjo/techeermarket/domain/mypage/service/MyPageService.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 |
---|---|---|
@@ -1,4 +1,15 @@ | ||
package com.teamjo.techeermarket.domain.mypage.service; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
//@Service | ||
//@RequiredArgsConstructor | ||
public class MyPageService { | ||
|
||
|
||
|
||
|
||
|
||
|
||
} |
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
Oops, something went wrong.