Update UserService.java

Signed-off-by: jeet041 <mahorjitendra@gmail.com>
This commit is contained in:
jeet041 2025-04-24 01:08:36 +05:30 committed by GitHub
parent 8853318834
commit 5a82ae3a41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}
}