Update UserService.java

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

View file

@ -1,23 +1,21 @@
// File: UserService.java
public class UserService {
public String getUserName(int userId) {
return "MainBranchUser#" + userId; // Different logic
return "User" + userId;
}
public boolean isUserActive(int userId) {
return checkUserStatusFromDB(userId); // Pull from DB now
return true;
}
public void updateUserStatus(int userId, boolean isActive) {
logStatusUpdate(userId, isActive);
// Update in DB
// update logic here
}
private boolean checkUserStatusFromDB(int userId) {
return true; // stub
public void deleteUser(int userId) {
// deletion logic
}
private void logStatusUpdate(int userId, boolean isActive) {
System.out.println("Main Branch: Logging status update for user " + userId);
public void notifyUser(int userId, String message) {
System.out.println("Sending message: " + message);
}
}