mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 13:25:49 +00:00
Update UserService.java
Signed-off-by: jeet041 <mahorjitendra@gmail.com>
This commit is contained in:
parent
962375a7fe
commit
7c693ec2df
1 changed files with 9 additions and 4 deletions
|
@ -1,21 +1,26 @@
|
|||
public class UserService {
|
||||
public String getUserName(int userId) {
|
||||
return "User" + userId;
|
||||
return "Main: User_" + userId;
|
||||
}
|
||||
|
||||
public boolean isUserActive(int userId) {
|
||||
System.out.println("Checking DB for active user");
|
||||
return true;
|
||||
}
|
||||
|
||||
public void updateUserStatus(int userId, boolean isActive) {
|
||||
// Update user status in DB
|
||||
System.out.println("Main branch: status set to " + isActive);
|
||||
}
|
||||
|
||||
public void notifyUser(int userId) {
|
||||
// Send notification
|
||||
System.out.println("Main: sending notification to user " + userId);
|
||||
}
|
||||
|
||||
public void deleteUser(int userId) {
|
||||
// Delete user logic
|
||||
logDeletion(userId);
|
||||
}
|
||||
|
||||
private void logDeletion(int userId) {
|
||||
System.out.println("Main: user " + userId + " deleted");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue