Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
timtech-profile
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
pull-resource
timtech-profile
Commits
28d15f1f
Commit
28d15f1f
authored
Dec 29, 2023
by
Syed Asif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update method changes done
parent
c12f8cc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
ProfileServiceImpl.java
.../com/timtech/profile/service/impl/ProfileServiceImpl.java
+9
-0
No files found.
src/main/java/com/timtech/profile/service/impl/ProfileServiceImpl.java
View file @
28d15f1f
...
...
@@ -66,6 +66,12 @@ public class ProfileServiceImpl implements ProfileService {
if
(
profileDto
==
null
)
{
return
Mono
.
error
(
new
RuntimeException
(
"Profile Should Not be NULL"
));
}
boolean
isValidPan
=
Utils
.
builder
().
build
().
isValidPanCard
(
profileDto
.
getPermanentAccountNumber
());
boolean
isValidAadhar
=
Utils
.
builder
().
build
().
isValidAadhar
(
profileDto
.
getAdharNumber
());
if
(
isValidPan
||
isValidAadhar
)
{
return
findOne
(
profileDto
.
getProfileId
()).
flatMap
(
existingProfileDto
->
{
if
(
"ACTIVE"
.
equals
(
existingProfileDto
.
getStatus
()))
{
...
...
@@ -80,6 +86,9 @@ public class ProfileServiceImpl implements ProfileService {
}
});
}
else
{
return
Mono
.
error
(
new
BusinessException
(
HttpStatus
.
BAD_REQUEST
,
"Invalid PAN or Aadhar Number"
));
}
}
...
...
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