Skip to content
Extraits de code Groupes Projets
Valider 0d64aabd rédigé par Mohamed Lemine BAILLAHI's avatar Mohamed Lemine BAILLAHI
Parcourir les fichiers

Merge branch 'feature/MLC-253' into 'develop'

MLC-253/edit the isAgentExists method

Closes MLC-253

See merge request !5
parents 2c203faa 7064ab79
Branches
1 requête de fusion!5MLC-253/edit the isAgentExists method
......@@ -17,4 +17,5 @@
- MLC-296/Centralized search logic in SpecificationUtils (for flexible field filtering)
- MLC-296/Implemented isAgentExists(Long id) method
- MLC-296/Created getManagerById and getAllManagers methods using ManagerResponseDTO (with @Builder)
- MLC-253/Update the isAgentExists method.
......@@ -42,9 +42,9 @@ public interface AgentService {
AgentResponseDTO getAgentById(Long id) throws FunctionalException;
public boolean isAgentExists(Long agentId) throws FunctionalException;
boolean isAgentExists(Long agentId);
public ManagerResponseDTO getManagerById(Long agentId) throws FunctionalException;
ManagerResponseDTO getManagerById(Long agentId) throws FunctionalException;
public List<ManagerResponseDTO> getAllManagers();
......
......@@ -231,11 +231,8 @@ public class AgentServiceImpl implements AgentService {
@Override
@Transactional(readOnly = true)
public boolean isAgentExists(Long agentId) throws FunctionalException {
if (!agentRepository.existsById(agentId)) {
throw new FunctionalException(Message.USER_NOT_FOUND + agentId);
}
return false;
public boolean isAgentExists(Long agentId){
return agentRepository.existsById(agentId);
}
@Override
......
0% ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter