Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
baby-monitoring-spring-backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
R24-145
baby-monitoring-spring-backend
Commits
9ddefda2
Commit
9ddefda2
authored
May 19, 2024
by
Chamod Ishankha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add dob to user dto
parent
08d23468
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
0 deletions
+6
-0
src/main/java/com/kaluwa/enterprises/babycarebackendservice/dto/UserDto.java
...aluwa/enterprises/babycarebackendservice/dto/UserDto.java
+3
-0
src/main/java/com/kaluwa/enterprises/babycarebackendservice/model/User.java
...kaluwa/enterprises/babycarebackendservice/model/User.java
+2
-0
src/main/java/com/kaluwa/enterprises/babycarebackendservice/service/impl/UserServiceImpl.java
.../babycarebackendservice/service/impl/UserServiceImpl.java
+1
-0
No files found.
src/main/java/com/kaluwa/enterprises/babycarebackendservice/dto/UserDto.java
View file @
9ddefda2
...
@@ -5,6 +5,8 @@ import lombok.AllArgsConstructor;
...
@@ -5,6 +5,8 @@ import lombok.AllArgsConstructor;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
java.time.LocalDate
;
@Data
@Data
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
...
@@ -16,4 +18,5 @@ public class UserDto {
...
@@ -16,4 +18,5 @@ public class UserDto {
private
String
phone
;
private
String
phone
;
private
String
role
;
private
String
role
;
private
String
status
;
private
String
status
;
private
LocalDate
dob
;
}
}
src/main/java/com/kaluwa/enterprises/babycarebackendservice/model/User.java
View file @
9ddefda2
...
@@ -8,6 +8,7 @@ import org.springframework.security.core.GrantedAuthority;
...
@@ -8,6 +8,7 @@ import org.springframework.security.core.GrantedAuthority;
import
org.springframework.security.core.authority.SimpleGrantedAuthority
;
import
org.springframework.security.core.authority.SimpleGrantedAuthority
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
java.time.LocalDate
;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
...
@@ -29,6 +30,7 @@ public class User implements UserDetails {
...
@@ -29,6 +30,7 @@ public class User implements UserDetails {
private
String
phone
;
private
String
phone
;
private
String
role
;
private
String
role
;
private
String
status
;
private
String
status
;
private
LocalDate
dob
;
@Override
@Override
public
Collection
<?
extends
GrantedAuthority
>
getAuthorities
()
{
public
Collection
<?
extends
GrantedAuthority
>
getAuthorities
()
{
...
...
src/main/java/com/kaluwa/enterprises/babycarebackendservice/service/impl/UserServiceImpl.java
View file @
9ddefda2
...
@@ -154,6 +154,7 @@ public class UserServiceImpl implements UserService {
...
@@ -154,6 +154,7 @@ public class UserServiceImpl implements UserService {
user
.
setFirstName
(
userDto
.
getFirstName
());
user
.
setFirstName
(
userDto
.
getFirstName
());
user
.
setLastName
(
userDto
.
getLastName
());
user
.
setLastName
(
userDto
.
getLastName
());
user
.
setPhone
(
userDto
.
getPhone
());
user
.
setPhone
(
userDto
.
getPhone
());
user
.
setDob
(
userDto
.
getDob
());
return
userMapper
.
toDto
(
userDao
.
save
(
user
));
return
userMapper
.
toDto
(
userDao
.
save
(
user
));
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
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