Update UserService.java

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

View file

@ -1,28 +1,21 @@
public class UserService {
public String getUserName(int userId) {
return "[Main] User#" + userId;
return "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) {
System.out.println("Main branch: logging status update");
// update logic to DB
// Update user status in DB
}
public void notifyUser(int userId) {
// Send notification
}
public void deleteUser(int userId) {
logDeletion(userId);
// deletion logic
}
public void notifyUser(int userId, String message) {
System.out.println("[Main] Sending message to user: " + message);
}
private void logDeletion(int userId) {
System.out.println("Logging deletion of user " + userId);
// Delete user logic
}
}