Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
inventory-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ascend
inventory-service
Commits
077d16b0
Commit
077d16b0
authored
May 05, 2021
by
John Lam
Browse files
Options
Browse Files
Download
Plain Diff
merge with dev
parents
a5f7220d
892ead98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
ProductDto.java
src/main/java/com/nisum/ascend/inventory/dto/ProductDto.java
+5
-4
Product.java
src/main/java/com/nisum/ascend/inventory/model/Product.java
+8
-8
No files found.
src/main/java/com/nisum/ascend/inventory/dto/ProductDto.java
View file @
077d16b0
...
...
@@ -9,10 +9,10 @@ import com.nisum.ascend.inventory.model.Product;
public
class
ProductDto
{
private
String
sku
;
private
String
upc
;
private
String
prodName
;
private
String
prod
Desc
;
private
String
prod
uct
Name
;
private
String
prod
uctDescription
;
private
float
price
;
private
String
prod
Img
Url
;
private
String
prod
uctImage
Url
;
private
String
brand
;
private
String
category
;
private
int
stock
;
...
...
@@ -23,6 +23,7 @@ public class ProductDto {
// TODO: Fetch the product's promotion from the Promotions com.nisum.ascend.inventory.service
PromotionDto
promotion
=
new
PromotionDto
();
return
new
ProductDto
(
product
.
getSku
(),
product
.
getUpc
(),
product
.
getProdName
(),
product
.
getProdDesc
(),
product
.
getPrice
(),
product
.
getProdImgUrl
(),
product
.
getBrand
(),
product
.
getCategory
(),
product
.
getAvailableStock
(),
promotion
);
return
new
ProductDto
(
product
.
getSku
(),
product
.
getUpc
(),
product
.
getProductName
(),
product
.
getProductDescription
(),
product
.
getPrice
(),
product
.
getProductImageUrl
(),
product
.
getBrand
(),
product
.
getCategory
(),
product
.
getAvailableStock
(),
promotion
);
}
}
src/main/java/com/nisum/ascend/inventory/model/Product.java
View file @
077d16b0
...
...
@@ -15,25 +15,25 @@ public class Product {
@Indexed
(
unique
=
true
)
private
String
sku
;
private
String
upc
;
private
String
prodName
;
private
String
prod
Desc
;
private
String
prod
uct
Name
;
private
String
prod
uctDescription
;
private
float
price
;
private
int
availableStock
;
private
int
blockedStock
;
private
String
prod
Img
Url
;
private
String
prod
uctImage
Url
;
private
String
brand
;
private
String
category
;
public
Product
(
String
sku
,
String
upc
,
String
prod
Name
,
String
prodDesc
,
float
price
,
int
availableStock
,
String
prod
Img
Url
,
String
brand
,
String
category
)
{
public
Product
(
String
sku
,
String
upc
,
String
prod
uctName
,
String
productDescription
,
float
price
,
int
availableStock
,
String
prod
uctImage
Url
,
String
brand
,
String
category
)
{
this
.
sku
=
sku
;
this
.
upc
=
upc
;
this
.
prod
Name
=
prod
Name
;
this
.
prod
Desc
=
prodDesc
;
this
.
prod
uctName
=
product
Name
;
this
.
prod
uctDescription
=
productDescription
;
this
.
price
=
price
;
this
.
availableStock
=
availableStock
;
this
.
blockedStock
=
0
;
this
.
prod
ImgUrl
=
prodImg
Url
;
this
.
prod
uctImageUrl
=
productImage
Url
;
this
.
brand
=
brand
;
this
.
category
=
category
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment