-
Notifications
You must be signed in to change notification settings - Fork 1
5 update business service #7
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
f6f87f6
BS successfully connected to DB
technologic-technologic 9722586
Modified Product object requirements
technologic-technologic 131ec63
Modified Product
technologic-technologic d65d406
Business service updated
technologic-technologic 83276be
Moved hardcoded versions
technologic-technologic df8e90a
Added lombok dependency to the project
technologic-technologic 5453e4a
Deleted getters & setters
technologic-technologic f31818e
Changed to .yml for the properties file
technologic-technologic faa56da
Deleted unused class
technologic-technologic 2376723
New method to delete products
technologic-technologic 10c7eaa
Updated the body type of the endpoints response entities with a DTO
technologic-technologic 755ab54
Added feature to retrieve number of pages per data fetch
technologic-technologic ebc6eae
Added functionality so client can fetch all the different categories
technologic-technologic 6a7c42b
Added summary/metrics functionality logic and endpoint
technologic-technologic 378946f
testing
technologic-technologic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
137 changes: 118 additions & 19 deletions
137
src/main/java/com/encorazone/inventory_manager/controller/InventoryManagerController.java
This file contains hidden or 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
10 changes: 10 additions & 0 deletions
10
src/main/java/com/encorazone/inventory_manager/domain/InventorySummaryInterface.java
This file contains hidden or 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,10 @@ | ||
| package com.encorazone.inventory_manager.domain; | ||
|
|
||
| import java.math.BigDecimal; | ||
|
|
||
| public interface InventorySummaryInterface { | ||
| String getCategory(); | ||
| Long getProductsInStock(); | ||
| BigDecimal getValueInStock(); | ||
| BigDecimal getAverageValue(); | ||
| } |
24 changes: 24 additions & 0 deletions
24
src/main/java/com/encorazone/inventory_manager/domain/InventorySummaryResponse.java
This file contains hidden or 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,24 @@ | ||
| package com.encorazone.inventory_manager.domain; | ||
|
|
||
| import lombok.Data; | ||
|
|
||
| import java.math.BigDecimal; | ||
|
|
||
| @Data | ||
| public class InventorySummaryResponse{ | ||
| private String category; | ||
|
|
||
| private Integer productsInStock; | ||
|
|
||
| private BigDecimal valueInStock; | ||
|
|
||
| private BigDecimal averageValue; | ||
|
|
||
| public InventorySummaryResponse(String category, long productsInStock, BigDecimal valueInStock, | ||
| BigDecimal averageValue) { | ||
| this.category = category; | ||
| this.productsInStock = (int) productsInStock; | ||
| this.valueInStock = valueInStock; | ||
| this.averageValue = averageValue; | ||
| } | ||
| } |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.