Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
orders-monitoring-dashboard
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
Ramakanth Dhane
orders-monitoring-dashboard
Commits
2895ed15
Commit
2895ed15
authored
Apr 27, 2020
by
rani0808
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed orderDate and estimated Date format to String
parent
7cf48a6e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
9 deletions
+12
-9
OrderGenerator.java
...t-service/src/main/java/com/nisum/omd/OrderGenerator.java
+5
-1
LineItem.java
...-service/src/main/java/com/nisum/omd/domain/LineItem.java
+3
-3
Order.java
...out-service/src/main/java/com/nisum/omd/domain/Order.java
+3
-3
RandomDataGeneratorImpl.java
...n/java/com/nisum/omd/service/RandomDataGeneratorImpl.java
+1
-2
No files found.
omd-checkout-service/src/main/java/com/nisum/omd/OrderGenerator.java
View file @
2895ed15
package
com
.
nisum
.
omd
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
com.nisum.omd.service.OmdProducerService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -52,7 +53,10 @@ public class OrderGenerator implements CommandLineRunner{
LocalDateTime
currentTime
=
LocalDateTime
.
now
();
order
.
setOrderNum
(
rdg
.
generateOrderNumber
());
order
.
setCustomerId
(
rdg
.
generateCustomerId
());
order
.
setOrderDate
(
currentTime
);
LocalDateTime
currentDateTime
=
LocalDateTime
.
now
();
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ISO_DATE_TIME
;
String
formattedDateTime
=
currentTime
.
format
(
formatter
);
order
.
setOrderDate
(
formattedDateTime
);
order
.
setLineItem
(
rdg
.
genetateLineItem
(
order
.
getLineItem
()));
return
order
;
}
...
...
omd-checkout-service/src/main/java/com/nisum/omd/domain/LineItem.java
View file @
2895ed15
...
...
@@ -16,7 +16,7 @@ public class LineItem {
private
String
productName
;
private
String
itemType
;
private
boolean
shipChrgApplInd
;
private
LocalDateTime
estimatedShipDate
;
private
String
estimatedShipDate
;
private
Map
<
String
,
Object
>
linePriceInfo
;
private
Map
<
String
,
Object
>
lineTax
;
...
...
@@ -69,10 +69,10 @@ public class LineItem {
public
void
setShipChrgApplInd
(
boolean
shipChrgApplInd
)
{
this
.
shipChrgApplInd
=
shipChrgApplInd
;
}
public
LocalDateTime
getEstimatedShipDate
()
{
public
String
getEstimatedShipDate
()
{
return
estimatedShipDate
;
}
public
void
setEstimatedShipDate
(
LocalDateTime
estimatedShipDate
)
{
public
void
setEstimatedShipDate
(
String
estimatedShipDate
)
{
this
.
estimatedShipDate
=
estimatedShipDate
;
}
public
Map
<
String
,
Object
>
getLinePriceInfo
()
{
...
...
omd-checkout-service/src/main/java/com/nisum/omd/domain/Order.java
View file @
2895ed15
...
...
@@ -11,7 +11,7 @@ public class Order {
private
String
orderNum
;
private
LocalDateTime
orderDate
;
private
String
orderDate
;
private
String
currency
;
private
String
shipMethod
;
private
String
customerId
;
...
...
@@ -47,11 +47,11 @@ public class Order {
this
.
orderNum
=
orderNum
;
}
public
LocalDateTime
getOrderDate
()
{
public
String
getOrderDate
()
{
return
orderDate
;
}
public
void
setOrderDate
(
LocalDateTime
orderDate
)
{
public
void
setOrderDate
(
String
orderDate
)
{
this
.
orderDate
=
orderDate
;
}
...
...
omd-checkout-service/src/main/java/com/nisum/omd/service/RandomDataGeneratorImpl.java
View file @
2895ed15
...
...
@@ -48,8 +48,7 @@ public class RandomDataGeneratorImpl implements RandomDataGenerator {
int
randomIndex
=
rand
.
nextInt
(
productname
.
size
());
String
randomElement
=
productname
.
get
(
randomIndex
);
li
.
setProductName
(
randomElement
);
li
.
setEstimatedShipDate
(
order
.
getOrderDate
().
plusDays
(
5
));
li
.
setEstimatedShipDate
(
order
.
getOrderDate
()+
5
);
return
li
;
}
...
...
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