diff --git a/src/main/java/code/shubham/core/order/items/services/OrderItemService.java b/src/main/java/code/shubham/core/order/items/services/OrderItemService.java index 516ccee..0345f48 100644 --- a/src/main/java/code/shubham/core/order/items/services/OrderItemService.java +++ b/src/main/java/code/shubham/core/order/items/services/OrderItemService.java @@ -25,7 +25,7 @@ public class OrderItemService { private final OrderItemRepository repository; - private final IInventoryService inventoryService; + // private final IInventoryService inventoryService; public List save(final Long orderId, final List items) { final List orderItems = items.stream() @@ -40,8 +40,10 @@ public List save(final Long orderId, final List items) final var persisted = this.save(orderItems, orderId); - items.forEach(item -> this.inventoryService.applyQuantityOperation(item.getInventoryId(), item.getQuantity(), - item.getClientReferenceId())); + // items.forEach(item -> + // this.inventoryService.applyQuantityOperation(item.getInventoryId(), + // item.getQuantity(), + // item.getClientReferenceId())); persisted.forEach(item -> item.setStatus(OrderItemStatus.AWAITING_PAYMENT)); return this.save(persisted, orderId); } diff --git a/src/main/java/code/shubham/core/order/items/services/states/AbstractOrderItemState.java b/src/main/java/code/shubham/core/order/items/services/states/AbstractOrderItemState.java index a768c5d..fc8250a 100644 --- a/src/main/java/code/shubham/core/order/items/services/states/AbstractOrderItemState.java +++ b/src/main/java/code/shubham/core/order/items/services/states/AbstractOrderItemState.java @@ -8,7 +8,6 @@ @Slf4j @SuperBuilder -@Builder @RequiredArgsConstructor public abstract class AbstractOrderItemState { diff --git a/src/main/java/code/shubham/core/order/items/services/states/OrderItemCreatedState.java b/src/main/java/code/shubham/core/order/items/services/states/OrderItemCreatedState.java index db2fb3f..5884cb8 100644 --- a/src/main/java/code/shubham/core/order/items/services/states/OrderItemCreatedState.java +++ b/src/main/java/code/shubham/core/order/items/services/states/OrderItemCreatedState.java @@ -25,4 +25,14 @@ public boolean cancel() { return false; } + @Override + public boolean initiateReturn() { + return false; + } + + @Override + public boolean returnSuccess() { + return false; + } + } diff --git a/src/main/java/code/shubham/core/order/orchestrator/CreateOrderOrchestrator.java b/src/main/java/code/shubham/core/order/orchestrator/CreateOrderOrchestrator.java index f34f2e2..172e13d 100644 --- a/src/main/java/code/shubham/core/order/orchestrator/CreateOrderOrchestrator.java +++ b/src/main/java/code/shubham/core/order/orchestrator/CreateOrderOrchestrator.java @@ -18,7 +18,7 @@ import java.util.Optional; @Scope("prototype") -@Component("CreateOrderOrchestrator") +// @Component("CreateOrderOrchestrator") @RequiredArgsConstructor public class CreateOrderOrchestrator { diff --git a/src/main/java/code/shubham/core/order/services/states/AbstractOrderState.java b/src/main/java/code/shubham/core/order/services/states/AbstractOrderState.java index d26029f..368695a 100644 --- a/src/main/java/code/shubham/core/order/services/states/AbstractOrderState.java +++ b/src/main/java/code/shubham/core/order/services/states/AbstractOrderState.java @@ -8,7 +8,6 @@ @Slf4j @SuperBuilder -@Builder @RequiredArgsConstructor public abstract class AbstractOrderState { diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index cb5ae03..235d976 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -94,7 +94,7 @@ springdoc: documents: bucket: - name: documents + name: documentssstore order: item: diff --git a/src/test/java/code/shubham/core/accountprofiles/web/v1/controllers/AccountProfileControllerTest.java b/src/test/java/code/shubham/core/accountprofiles/web/v1/controllers/AccountProfileControllerTest.java index f8090fb..ff523dc 100644 --- a/src/test/java/code/shubham/core/accountprofiles/web/v1/controllers/AccountProfileControllerTest.java +++ b/src/test/java/code/shubham/core/accountprofiles/web/v1/controllers/AccountProfileControllerTest.java @@ -108,8 +108,8 @@ void getByUserId_without_existing_user() throws Exception { .andExpect(status().is(400)) .andExpect(content().json("{\n" + " \"statusCode\": 400,\n" + " \"data\": null,\n" + " \"error\": [\n" + " {\n" + " \"accountId\": [\n" - + " \"No account profile found for accountId: " + TestCommonConstants.ACCOUNT_ID + "\"\n" - + " ]\n" + " }\n" + " ]\n" + "}")); + + " \"No account profile found for accountId: " + TestCommonConstants.ACCOUNT_ID + + "\"\n" + " ]\n" + " }\n" + " ]\n" + "}")); final var profiles = this.repository.findByAccountId(TestCommonConstants.ACCOUNT_ID);