-
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.
Merge remote-tracking branch 'origin/develop' into develop
- Loading branch information
Showing
11 changed files
with
93 additions
and
59 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
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
21 changes: 21 additions & 0 deletions
21
src/main/java/zerobibim/flory/domain/purchase/controller/NftController.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 zerobibim.flory.domain.purchase.controller; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
import org.web3j.protocol.core.methods.response.TransactionReceipt; | ||
import zerobibim.flory.domain.purchase.dto.request.NFTRequestDto; | ||
import zerobibim.flory.domain.purchase.service.Web3jService; | ||
|
||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/api/nft") | ||
public class NftController { | ||
private final Web3jService web3jService; | ||
// Define your API endpoints here | ||
@PostMapping("/mint") | ||
public TransactionReceipt mintToken() throws Exception { | ||
return web3jService.nftCreate(new NFTRequestDto.MemberNFTInfo("0x06f5ad6ca1fdbba1ac90b64472a36ca58a83b8af", "ipfs://QmVumYTYwP4F1DVLmaE527g7JDfB6Z1tzYFm8VE3zGPo1M")); | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...ry/domain/contract/dto/NFTRequestDto.java → ...n/purchase/dto/request/NFTRequestDto.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
18 changes: 18 additions & 0 deletions
18
src/main/java/zerobibim/flory/domain/purchase/dto/response/NftImageResponse.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,18 @@ | ||
package zerobibim.flory.domain.purchase.dto.response; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDate; | ||
|
||
@Getter | ||
@Builder | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
public class NftImageResponse { | ||
private String url; | ||
private String senderNickname; | ||
private LocalDate receiveDate; | ||
} |
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
4 changes: 4 additions & 0 deletions
4
src/main/java/zerobibim/flory/domain/purchase/repository/PurchaseRepository.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,11 +1,15 @@ | ||
package zerobibim.flory.domain.purchase.repository; | ||
|
||
import zerobibim.flory.domain.member.entity.Member; | ||
import zerobibim.flory.domain.purchase.entity.Purchase; | ||
|
||
import java.util.List; | ||
import java.util.Optional; | ||
|
||
public interface PurchaseRepository { | ||
|
||
Purchase save(Purchase purchase); | ||
Optional<Purchase> findPurchaseById(Long id); | ||
List<Purchase> findAllByReceiverAndAndIsNftTrue(Member receiver); | ||
|
||
} |
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
13 changes: 2 additions & 11 deletions
13
...domain/contract/service/Web3jService.java → ...domain/purchase/service/Web3jService.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