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
c6cd8a62
Commit
c6cd8a62
authored
May 04, 2020
by
Ramakanth Dhane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Security changes
parent
105f3a03
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
5 deletions
+23
-5
OrdersSummaryController.java
...va/com/nisum/omd/controllers/OrdersSummaryController.java
+1
-1
WebSecurityConfig.java
...c/main/java/com/nisum/omd/security/WebSecurityConfig.java
+1
-1
OrdersSummaryServiceImpl.java
.../java/com/nisum/omd/service/OrdersSummaryServiceImpl.java
+21
-3
No files found.
omd-dashboard/src/main/java/com/nisum/omd/controllers/OrdersSummaryController.java
View file @
c6cd8a62
...
...
@@ -15,7 +15,7 @@ import com.nisum.omd.service.OrdersSummaryService;
@RestController
@RequestMapping
(
"
api
"
)
@RequestMapping
(
"
orders
"
)
public
class
OrdersSummaryController
{
@Autowired
...
...
omd-dashboard/src/main/java/com/nisum/omd/security/WebSecurityConfig.java
View file @
c6cd8a62
...
...
@@ -59,7 +59,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.
exceptionHandling
().
authenticationEntryPoint
(
unauthorizedHandler
).
and
()
.
sessionManagement
().
sessionCreationPolicy
(
SessionCreationPolicy
.
STATELESS
).
and
()
.
authorizeRequests
().
antMatchers
(
"/api/auth/**"
).
permitAll
()
.
antMatchers
(
"/
api/test
/**"
).
permitAll
()
.
antMatchers
(
"/
orders
/**"
).
permitAll
()
.
anyRequest
().
authenticated
();
http
.
addFilterBefore
(
authenticationJwtTokenFilter
(),
UsernamePasswordAuthenticationFilter
.
class
);
...
...
omd-dashboard/src/main/java/com/nisum/omd/service/OrdersSummaryServiceImpl.java
View file @
c6cd8a62
...
...
@@ -30,7 +30,10 @@ public class OrdersSummaryServiceImpl implements OrdersSummaryService {
@Autowired
private
OrdersSummaryRepository
ordersSummaryRepository
;
static
long
minuteCount
=
0
;
static
long
HrCount
=
0
;
static
long
dayCount
=
0
;
static
int
cutomers
=
0
;
private
Long
orderCountInMinute
(){
...
...
@@ -175,7 +178,7 @@ public class OrdersSummaryServiceImpl implements OrdersSummaryService {
return
orders
;
}
public
OrdersSummary
getOrderSummaryCount
(){
/*
public OrdersSummary getOrderSummaryCount(){
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("MM-dd-YYYY");
LocalDateTime localTime = LocalDateTime.now();
OrdersSummary ordersSummary=new OrdersSummary();
...
...
@@ -188,7 +191,22 @@ public class OrdersSummaryServiceImpl implements OrdersSummaryService {
ordersSummary.setCurrentDate(simpleDateFormat.format(new Date()));
return ordersSummary;
}
*/
public
OrdersSummary
getOrderSummaryCount
(){
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"MM-dd-YYYY"
);
LocalDateTime
localTime
=
LocalDateTime
.
now
();
OrdersSummary
ordersSummary
=
new
OrdersSummary
();
ordersSummary
.
setOrderCountInMinute
(++
minuteCount
);
ordersSummary
.
setOrderCountInHour
(++
HrCount
);
ordersSummary
.
setOrderCountInDay
(++
dayCount
);
ordersSummary
.
setTotalCustomers
(++
cutomers
);
ordersSummary
.
setCurrentMinute
(
LocalTime
.
of
(
localTime
.
getHour
(),
localTime
.
getMinute
(),
00
).
toString
());
ordersSummary
.
setCurrentHour
(
LocalTime
.
of
(
localTime
.
getHour
(),
00
,
00
).
toString
());
ordersSummary
.
setCurrentDate
(
simpleDateFormat
.
format
(
new
Date
()));
return
ordersSummary
;
}
...
...
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