mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:35:50 +00:00
Update UserService.java
Signed-off-by: jeet041 <mahorjitendra@gmail.com>
This commit is contained in:
parent
8853318834
commit
5a82ae3a41
1 changed files with 10 additions and 3 deletions
|
@ -1,21 +1,28 @@
|
|||
public class UserService {
|
||||
public String getUserName(int userId) {
|
||||
return "User" + userId;
|
||||
return "[Main] User#" + userId;
|
||||
}
|
||||
|
||||
public boolean isUserActive(int userId) {
|
||||
System.out.println("Main branch: checking DB for user activity");
|
||||
return true;
|
||||
}
|
||||
|
||||
public void updateUserStatus(int userId, boolean isActive) {
|
||||
// update logic here
|
||||
System.out.println("Main branch: logging status update");
|
||||
// update logic to DB
|
||||
}
|
||||
|
||||
public void deleteUser(int userId) {
|
||||
logDeletion(userId);
|
||||
// deletion logic
|
||||
}
|
||||
|
||||
public void notifyUser(int userId, String message) {
|
||||
System.out.println("Sending message: " + message);
|
||||
System.out.println("[Main] Sending message to user: " + message);
|
||||
}
|
||||
|
||||
private void logDeletion(int userId) {
|
||||
System.out.println("Logging deletion of user " + userId);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue