Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
Grievance
Commits
104b2072
Unverified
Commit
104b2072
authored
1 year ago
by
Shishir Suman
Committed by
GitHub
1 year ago
Browse files
Options
Download
Plain Diff
Merge pull request #55 from UPHRH-platform/UPHRH_7903_mobile_otp
bug fixes
parents
9666fdf6
e4eeb546
UAT
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/upsmf/grievance/service/impl/IntegrationServiceImpl.java
+6
-1
.../upsmf/grievance/service/impl/IntegrationServiceImpl.java
src/main/java/org/upsmf/grievance/service/impl/SchedulerConfigServiceImpl.java
+4
-0
...mf/grievance/service/impl/SchedulerConfigServiceImpl.java
with
10 additions
and
1 deletion
+10
-1
src/main/java/org/upsmf/grievance/service/impl/IntegrationServiceImpl.java
+
6
−
1
View file @
104b2072
...
...
@@ -861,6 +861,11 @@ public class IntegrationServiceImpl implements IntegrationService {
userDetails
.
setStatus
(
1
);
emailService
.
sendUserActivationMail
(
userDetails
,
true
);
User
data
=
userRepository
.
save
(
userDetails
);
// update mail config if user role secretary
boolean
superadmin
=
Arrays
.
stream
(
data
.
getRoles
()).
anyMatch
(
role
->
role
.
equalsIgnoreCase
(
"SUPERADMIN"
));
if
(
superadmin
)
{
updateMailConfigEmail
(
data
.
getEmail
());
}
return
ResponseEntity
.
ok
(
data
);
}
return
ResponseEntity
.
internalServerError
().
body
(
"Error in activating user."
);
...
...
@@ -890,7 +895,7 @@ public class IntegrationServiceImpl implements IntegrationService {
// get existing user for role
long
count
=
users
.
stream
().
filter
(
user
->
Arrays
.
stream
(
user
.
getRoles
()).
anyMatch
(
userRole
->
userRole
.
equalsIgnoreCase
(
role
))
&&
user
.
getStatus
()
==
1
).
count
();
&&
user
.
getStatus
()
==
1
&&
user
.
getId
()
!=
userDetails
.
getId
()
).
count
();
log
.
debug
(
"Active user count - {}"
,
count
);
matchCount
.
set
(
count
);
}
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/upsmf/grievance/service/impl/SchedulerConfigServiceImpl.java
+
4
−
0
View file @
104b2072
...
...
@@ -75,6 +75,10 @@ public class SchedulerConfigServiceImpl implements SchedulerConfigService {
Optional
<
MailConfig
>
configById
=
mailConfigRepository
.
findById
(
mailConfigDto
.
getId
());
if
(
configById
.
isPresent
())
{
MailConfig
existingConfig
=
configById
.
get
();
if
(
mailConfigDto
.
getAuthorityEmails
()
!=
null
&&
!
mailConfigDto
.
getAuthorityEmails
().
isEmpty
())
{
String
emails
=
String
.
join
(
","
,
mailConfigDto
.
getAuthorityEmails
());
existingConfig
.
setAuthorityEmails
(
emails
);
}
existingConfig
.
setConfigValue
(
mailConfigDto
.
getConfigValue
());
existingConfig
.
setUpdatedBy
(
mailConfigDto
.
getUpdatedBy
());
existingConfig
.
setUpdatedDate
(
Timestamp
.
valueOf
(
LocalDateTime
.
now
()));
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets