From 3bbf73f9a28d0a1e65719c91895e6024c80e21ef Mon Sep 17 00:00:00 2001 From: JuseungL <121665437+JuseungL@users.noreply.github.com> Date: Wed, 31 Jul 2024 23:28:04 +0900 Subject: [PATCH] deploy --- .github/workflows/deploy.yml | 2 +- .../api/contact/domain/Contact.java | 1 - .../controller/PurchaseRecordController.java | 40 +++++++++++++++++++ .../domain/PurchaseRecord.java | 2 +- .../PurchaseRecordCreateRequestDto.java | 6 +++ .../service/PurchaseRecordCommandService.java | 7 ++++ .../controller/PurchaseRecordController.java | 19 --------- 7 files changed, 55 insertions(+), 22 deletions(-) create mode 100644 src/main/java/lion6/DrinkGuide/api/purchase/controller/PurchaseRecordController.java rename src/main/java/lion6/DrinkGuide/api/{record => purchase}/domain/PurchaseRecord.java (92%) create mode 100644 src/main/java/lion6/DrinkGuide/api/purchase/dto/request/PurchaseRecordCreateRequestDto.java create mode 100644 src/main/java/lion6/DrinkGuide/api/purchase/service/PurchaseRecordCommandService.java delete mode 100644 src/main/java/lion6/DrinkGuide/api/record/controller/PurchaseRecordController.java diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5eaed02..94d7559 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,6 @@ name: CI/CD with Git Actions & Docker Hub -# 워크플로우 트리거: 브랜치에 대한 push 이벤트 발생 시 실행 +# 워크플로우 트리거: 브랜치에 대한 push 이벤트 발생 시 실행. on: push: branches: diff --git a/src/main/java/lion6/DrinkGuide/api/contact/domain/Contact.java b/src/main/java/lion6/DrinkGuide/api/contact/domain/Contact.java index dc63b7d..53ac95e 100644 --- a/src/main/java/lion6/DrinkGuide/api/contact/domain/Contact.java +++ b/src/main/java/lion6/DrinkGuide/api/contact/domain/Contact.java @@ -7,7 +7,6 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; -import org.w3c.dom.Text; @Entity @Getter diff --git a/src/main/java/lion6/DrinkGuide/api/purchase/controller/PurchaseRecordController.java b/src/main/java/lion6/DrinkGuide/api/purchase/controller/PurchaseRecordController.java new file mode 100644 index 0000000..8d174c3 --- /dev/null +++ b/src/main/java/lion6/DrinkGuide/api/purchase/controller/PurchaseRecordController.java @@ -0,0 +1,40 @@ +package lion6.DrinkGuide.api.purchase.controller; + +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lion6.DrinkGuide.api.purchase.domain.PurchaseRecord; +import lion6.DrinkGuide.api.purchase.service.PurchaseRecordCommandService; +import lion6.DrinkGuide.common.response.ApiResponse; +import lombok.RequiredArgsConstructor; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.security.Principal; + +@RestController +@RequestMapping("/api/v1/records") +@RequiredArgsConstructor +@Tag(name="구매 데이터 수집 컨트롤러",description = "스캔 기능을 통해 구매한 상품을 기록하고 관리하는 컨트롤러입니다.") +public class PurchaseRecordController { + private final PurchaseRecordCommandService purchaseRecordCommandService; + /** + * 구매 내역 저장 + */ +// @PostMapping +// @Operation(summary = "구매 내역 저장", description = "구매한 상품 기록을 저장합니다.") +// public ResponseEntity> createPurchaseRecord( +// Principal principal, +// @RequestBody PurchaseRecordCreateRequestDto purchaseRecordCreateRequestDto +// ) { +// +// return ApiResponse.success(); +// } + + + /** + * 구매 내역 조회 + */ +} diff --git a/src/main/java/lion6/DrinkGuide/api/record/domain/PurchaseRecord.java b/src/main/java/lion6/DrinkGuide/api/purchase/domain/PurchaseRecord.java similarity index 92% rename from src/main/java/lion6/DrinkGuide/api/record/domain/PurchaseRecord.java rename to src/main/java/lion6/DrinkGuide/api/purchase/domain/PurchaseRecord.java index 9bd7167..5f01264 100644 --- a/src/main/java/lion6/DrinkGuide/api/record/domain/PurchaseRecord.java +++ b/src/main/java/lion6/DrinkGuide/api/purchase/domain/PurchaseRecord.java @@ -1,4 +1,4 @@ -package lion6.DrinkGuide.api.record.domain; +package lion6.DrinkGuide.api.purchase.domain; import jakarta.persistence.*; import lion6.DrinkGuide.api.member.domain.Member; diff --git a/src/main/java/lion6/DrinkGuide/api/purchase/dto/request/PurchaseRecordCreateRequestDto.java b/src/main/java/lion6/DrinkGuide/api/purchase/dto/request/PurchaseRecordCreateRequestDto.java new file mode 100644 index 0000000..07fca18 --- /dev/null +++ b/src/main/java/lion6/DrinkGuide/api/purchase/dto/request/PurchaseRecordCreateRequestDto.java @@ -0,0 +1,6 @@ +package lion6.DrinkGuide.api.purchase.dto.request; + +public record PurchaseRecordCreateRequestDto( + +) { +} diff --git a/src/main/java/lion6/DrinkGuide/api/purchase/service/PurchaseRecordCommandService.java b/src/main/java/lion6/DrinkGuide/api/purchase/service/PurchaseRecordCommandService.java new file mode 100644 index 0000000..2636441 --- /dev/null +++ b/src/main/java/lion6/DrinkGuide/api/purchase/service/PurchaseRecordCommandService.java @@ -0,0 +1,7 @@ +package lion6.DrinkGuide.api.purchase.service; + +import org.springframework.stereotype.Service; + +@Service +public class PurchaseRecordCommandService { +} diff --git a/src/main/java/lion6/DrinkGuide/api/record/controller/PurchaseRecordController.java b/src/main/java/lion6/DrinkGuide/api/record/controller/PurchaseRecordController.java deleted file mode 100644 index b45cd32..0000000 --- a/src/main/java/lion6/DrinkGuide/api/record/controller/PurchaseRecordController.java +++ /dev/null @@ -1,19 +0,0 @@ -package lion6.DrinkGuide.api.record.controller; - -import lombok.RequiredArgsConstructor; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@RequestMapping("/api/v1/records") -@RequiredArgsConstructor -public class PurchaseRecordController { - - /** - * 구매 내역 저장 - */ - - /** - * 구매 내역 조회 - */ -}