added various fields inside the dropdown

This commit is contained in:
2026-08-19 15:37:57 +05:30
parent 3914e4f304
commit 3579dcb765
10 changed files with 1685 additions and 80 deletions

View File

@@ -19,6 +19,7 @@ public class SessionService {
// In-memory cache for API session tokens
private final Map<String, String> sessionTokens = new ConcurrentHashMap<>();
private final Map<String, String> temporaryLoginIds = new ConcurrentHashMap<>();
private final Map<String, String> studentNames = new ConcurrentHashMap<>();
private final UserRepository userRepository;
private final EncryptionUtils encryptionUtils;
@@ -90,9 +91,19 @@ public class SessionService {
imsApiService.logout(token);
}
userRepository.deleteById(phoneNumber);
studentNames.remove(phoneNumber);
resetState(phoneNumber);
}
public String getStudentName(String phoneNumber, String token) {
if (studentNames.containsKey(phoneNumber)) {
return studentNames.get(phoneNumber);
}
String name = imsApiService.getStudentName(token);
studentNames.put(phoneNumber, name);
return name;
}
public void setTempLoginId(String phoneNumber, String tempId) {
temporaryLoginIds.put(phoneNumber, tempId);
}