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
5632daf3
Commit
5632daf3
authored
May 05, 2021
by
Khai Yuan Liew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update product model and dto
parent
1270fc1d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
ProductDto.java
src/main/java/dto/ProductDto.java
+4
-4
Product.java
src/main/java/model/Product.java
+8
-8
No files found.
src/main/java/dto/ProductDto.java
View file @
5632daf3
...
@@ -9,10 +9,10 @@ import model.Product;
...
@@ -9,10 +9,10 @@ import model.Product;
public
class
ProductDto
{
public
class
ProductDto
{
private
String
sku
;
private
String
sku
;
private
String
upc
;
private
String
upc
;
private
String
prodName
;
private
String
prod
uct
Name
;
private
String
prod
Desc
;
private
String
prod
uctDescription
;
private
float
price
;
private
float
price
;
private
String
prod
Img
Url
;
private
String
prod
uctImage
Url
;
private
String
brand
;
private
String
brand
;
private
String
category
;
private
String
category
;
private
int
stock
;
private
int
stock
;
...
@@ -23,7 +23,7 @@ public class ProductDto {
...
@@ -23,7 +23,7 @@ public class ProductDto {
// TODO: Fetch the product's promotion from the Promotions service
// TODO: Fetch the product's promotion from the Promotions service
PromotionDto
promotion
=
new
PromotionDto
();
PromotionDto
promotion
=
new
PromotionDto
();
return
new
ProductDto
(
product
.
getSku
(),
product
.
getUpc
(),
product
.
getProd
Name
(),
product
.
getProdDesc
(),
product
.
getPrice
(),
product
.
getProdImg
Url
(),
product
.
getBrand
(),
product
.
getCategory
(),
product
.
getAvailableStock
(),
promotion
);
return
new
ProductDto
(
product
.
getSku
(),
product
.
getUpc
(),
product
.
getProd
uctName
(),
product
.
getProductDescription
(),
product
.
getPrice
(),
product
.
getProductImage
Url
(),
product
.
getBrand
(),
product
.
getCategory
(),
product
.
getAvailableStock
(),
promotion
);
}
}
}
}
src/main/java/model/Product.java
View file @
5632daf3
...
@@ -15,25 +15,25 @@ public class Product {
...
@@ -15,25 +15,25 @@ public class Product {
@Indexed
(
unique
=
true
)
@Indexed
(
unique
=
true
)
private
String
sku
;
private
String
sku
;
private
String
upc
;
private
String
upc
;
private
String
prodName
;
private
String
prod
uct
Name
;
private
String
prod
Desc
;
private
String
prod
uctDescription
;
private
float
price
;
private
float
price
;
private
int
availableStock
;
private
int
availableStock
;
private
int
blockedStock
;
private
int
blockedStock
;
private
String
prod
Img
Url
;
private
String
prod
uctImage
Url
;
private
String
brand
;
private
String
brand
;
private
String
category
;
private
String
category
;
public
Product
(
String
sku
,
String
upc
,
String
prod
Name
,
String
prodDesc
,
float
price
,
int
availableStock
,
public
Product
(
String
sku
,
String
upc
,
String
prod
uctName
,
String
productDescription
,
float
price
,
int
availableStock
,
String
prod
Img
Url
,
String
brand
,
String
category
)
{
String
prod
uctImage
Url
,
String
brand
,
String
category
)
{
this
.
sku
=
sku
;
this
.
sku
=
sku
;
this
.
upc
=
upc
;
this
.
upc
=
upc
;
this
.
prod
Name
=
prod
Name
;
this
.
prod
uctName
=
product
Name
;
this
.
prod
Desc
=
prodDesc
;
this
.
prod
uctDescription
=
productDescription
;
this
.
price
=
price
;
this
.
price
=
price
;
this
.
availableStock
=
availableStock
;
this
.
availableStock
=
availableStock
;
this
.
blockedStock
=
0
;
this
.
blockedStock
=
0
;
this
.
prod
ImgUrl
=
prodImg
Url
;
this
.
prod
uctImageUrl
=
productImage
Url
;
this
.
brand
=
brand
;
this
.
brand
=
brand
;
this
.
category
=
category
;
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