Resolved Conflicts.
This commit is contained in:
@@ -40,4 +40,6 @@ public interface ApplicationService {
|
||||
|
||||
public void deleteSignedDocument(HttpServletRequest request, Long applicationId);
|
||||
|
||||
public ApplicationResponse validateApplication(HttpServletRequest request, Long applicationId);
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public interface AssignedApplicationsService {
|
||||
|
||||
void deleteApplication(HttpServletRequest request, Long id);
|
||||
|
||||
List<AssignedApplicationsResponse> getAllAssignedApplications(Long userId);
|
||||
List<AssignedApplicationsResponse> getAllAssignedApplications(HttpServletRequest request, Long userId);
|
||||
AssignedApplicationsResponse updateAssignedApplication(HttpServletRequest request, Long id, AssignedApplicationsRequest assignedApplicationsRequest);
|
||||
AssignedApplicationsResponse getAssignedApplicationById(Long id);
|
||||
AssignedApplicationsResponse getAssignedApplicationById(HttpServletRequest request, Long id);
|
||||
}
|
||||
|
||||
@@ -29,6 +29,6 @@ public interface CallService {
|
||||
|
||||
CallEntity validateCall(Long callId);
|
||||
|
||||
CallEntity validatePublishedCall(Long callId);
|
||||
byte[] downloadCallDocumentsAsZip(Long callId);
|
||||
CallEntity validatePublishedCall(Long callId, Long hubId);
|
||||
byte[] downloadCallDocumentsAsZip(HttpServletRequest request, Long callId);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.List;
|
||||
|
||||
public interface LoginAttemptService {
|
||||
|
||||
LoginAttemptPageableResponseBean<List<LoginAttemptEntity>> getLoginAttemptsList(Integer pageNo, Integer pageLimit);
|
||||
LoginAttemptPageableResponseBean<List<LoginAttemptEntity>> getLoginAttemptsList(HttpServletRequest request, Integer pageNo, Integer pageLimit);
|
||||
|
||||
void createLoginAttempt(LoginAttemptReq loginAttemptReq, HttpServletRequest request);
|
||||
}
|
||||
|
||||
@@ -17,11 +17,11 @@ import java.util.List;
|
||||
public interface UserService {
|
||||
JWTToken createUser(HttpServletRequest request, String tempToken, UserReq userReq);
|
||||
|
||||
UserResponseBean updateUser(Long userId, UpdateUserReq userReq);
|
||||
UserResponseBean updateUser(HttpServletRequest request, Long userId, UpdateUserReq userReq);
|
||||
|
||||
UserResponseBean getUserById(Long userId);
|
||||
UserResponseBean getUserById(HttpServletRequest request, Long userId);
|
||||
|
||||
void deleteUser(Long userId);
|
||||
void deleteUser(HttpServletRequest request, Long userId);
|
||||
|
||||
JWTToken login(LoginReq loginReq,HttpServletRequest request);
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ public class ApplicationServiceImpl implements ApplicationService {
|
||||
public ApplicationResponse createApplication(HttpServletRequest request, Long companyId, ApplicationRequest applicationRequest, Long callId) {
|
||||
UserEntity userEntity = validator.validateUser(request);
|
||||
CompanyEntity companyEntity = validator.validateUserWithCompany(request, companyId);
|
||||
validator.validateUserWithCall(userEntity, callId);
|
||||
return applicationDao.createApplicationByCallId(companyEntity, applicationRequest, callId, userEntity);
|
||||
}
|
||||
|
||||
@@ -110,6 +111,11 @@ public class ApplicationServiceImpl implements ApplicationService {
|
||||
applicationDao.deleteSignedDocument(request, applicationId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ApplicationResponse validateApplication(HttpServletRequest request, Long applicationId) {
|
||||
return applicationDao.validateApplication(request, applicationId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -26,32 +26,32 @@ public class AssignedApplicationsServiceImpl implements AssignedApplicationsServ
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AssignedApplicationsResponse createAssignedApplications(HttpServletRequest request, Long applicationId, Long userId, AssignedApplicationsRequest assignedApplicationsRequest) {
|
||||
UserEntity assignedByUser= validator.validateUser(request);
|
||||
validator.validatePreInstructor(request, userId);
|
||||
return assignedApplicationsDao.createAssignedApplications(applicationId,userId,assignedByUser, assignedApplicationsRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteApplication(HttpServletRequest request, Long id) {
|
||||
assignedApplicationsDao.deleteById(id);
|
||||
assignedApplicationsDao.deleteById(request, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<AssignedApplicationsResponse> getAllAssignedApplications(Long userId) {
|
||||
return assignedApplicationsDao.getAllAssignedApplications(userId);
|
||||
public List<AssignedApplicationsResponse> getAllAssignedApplications(HttpServletRequest request, Long userId) {
|
||||
return assignedApplicationsDao.getAllAssignedApplications(request, userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AssignedApplicationsResponse updateAssignedApplication(HttpServletRequest request, Long id , AssignedApplicationsRequest updatedAssignedApplicationRequest) {
|
||||
UserEntity updatedByUser= validator.validateUser(request);
|
||||
return assignedApplicationsDao.updateAssignedApplication(id,updatedAssignedApplicationRequest,updatedByUser);
|
||||
public AssignedApplicationsResponse updateAssignedApplication(HttpServletRequest request, Long id, AssignedApplicationsRequest updatedAssignedApplicationRequest) {
|
||||
return assignedApplicationsDao.updateAssignedApplication(request, id, updatedAssignedApplicationRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public AssignedApplicationsResponse getAssignedApplicationById(Long id) {
|
||||
return assignedApplicationsDao.getAssignedApplicationById(id);
|
||||
public AssignedApplicationsResponse getAssignedApplicationById(HttpServletRequest request, Long id) {
|
||||
return assignedApplicationsDao.getAssignedApplicationById(request, id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import net.gepafin.tendermanagement.constants.GepafinConstant;
|
||||
import net.gepafin.tendermanagement.dao.CompanyDao;
|
||||
import net.gepafin.tendermanagement.dao.LoginAttemptDao;
|
||||
import net.gepafin.tendermanagement.dao.RoleDao;
|
||||
import net.gepafin.tendermanagement.entities.HubEntity;
|
||||
import net.gepafin.tendermanagement.entities.LoginAttemptEntity;
|
||||
import net.gepafin.tendermanagement.entities.SamlResponseEntity;
|
||||
import net.gepafin.tendermanagement.entities.UserEntity;
|
||||
@@ -22,6 +23,7 @@ import net.gepafin.tendermanagement.model.response.UserSamlResponse;
|
||||
import net.gepafin.tendermanagement.model.util.JWTToken;
|
||||
import net.gepafin.tendermanagement.repositories.SamlResponseRepository;
|
||||
import net.gepafin.tendermanagement.repositories.UserRepository;
|
||||
import net.gepafin.tendermanagement.service.HubService;
|
||||
import net.gepafin.tendermanagement.util.DateTimeUtil;
|
||||
import net.gepafin.tendermanagement.util.Utils;
|
||||
import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationException;
|
||||
@@ -63,6 +65,9 @@ public class AuthenticationService {
|
||||
|
||||
@Autowired
|
||||
private LoginAttemptDao loginAttemptDao;
|
||||
|
||||
@Autowired
|
||||
private HubService hubService;
|
||||
|
||||
@Autowired
|
||||
public AuthenticationService(TokenProvider tokenProvider, AuthenticationManager authenticationManager) {
|
||||
@@ -72,7 +77,7 @@ public class AuthenticationService {
|
||||
|
||||
public JWTToken login(LoginReq loginReq, HttpServletRequest request) {
|
||||
UserEntity user=null;
|
||||
|
||||
|
||||
LoginAttemptEntity loginAttemptEntity = prepareLoginAttemptEntity(loginReq, request);
|
||||
log.info("Attempting login for email: {}", loginReq.getEmail());
|
||||
String emailWithHubId = loginReq.getEmail()+":"+loginReq.getHubUuid();
|
||||
@@ -186,10 +191,11 @@ public class AuthenticationService {
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR,
|
||||
Translator.toLocale(GepafinConstant.INVALID_TOKEN_MSG));
|
||||
}
|
||||
HubEntity hub = hubService.getHubByUuid(samlResponseLogEntity.getHubUuid());
|
||||
Map<String, List<Object>> userAttributes = Utils
|
||||
.convertStringIntoMap(samlResponseLogEntity.getAuthenticationObject());
|
||||
String cf = userAttributes.get("CodiceFiscale").get(0).toString();
|
||||
UserEntity userEntity = userRepository.findByBeneficiaryCodiceFiscale(cf)
|
||||
UserEntity userEntity = userRepository.findByBeneficiaryCodiceFiscaleAndHubId(cf, hub.getId())
|
||||
.orElseThrow(() -> new ResourceNotFoundException(Status.NOT_FOUND,
|
||||
Translator.toLocale(GepafinConstant.USER_NOT_FOUND_MSG)));
|
||||
//samlResponseLogRepository.delete(samlResponseLogEntity);
|
||||
@@ -205,10 +211,11 @@ public class AuthenticationService {
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR,
|
||||
Translator.toLocale(GepafinConstant.INVALID_TOKEN_MSG));
|
||||
}
|
||||
HubEntity hub = hubService.getHubByUuid(samlResponseLogEntity.getHubUuid());
|
||||
Map<String, List<Object>> userAttributes = Utils
|
||||
.convertStringIntoMap(samlResponseLogEntity.getAuthenticationObject());
|
||||
String cf = userAttributes.get("CodiceFiscale").get(0).toString();
|
||||
if (userRepository.existsByBeneficiaryCodiceFiscale(cf)) {
|
||||
if (userRepository.existsByBeneficiaryCodiceFiscaleAndHubId(cf, hub.getId())) {
|
||||
throw new ResourceNotFoundException(Status.NOT_FOUND,
|
||||
Translator.toLocale(GepafinConstant.USER_ALREADY_EXIST_MSG));
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ import net.gepafin.tendermanagement.enums.BeneficiaryCallStatus;
|
||||
import net.gepafin.tendermanagement.model.request.BeneficiaryPreferredCallReq;
|
||||
|
||||
import net.gepafin.tendermanagement.model.response.BeneficiaryPreferredCallResponseBean;
|
||||
import net.gepafin.tendermanagement.repositories.UserRepository;
|
||||
import net.gepafin.tendermanagement.service.BeneficiaryPreferredCallService;
|
||||
import net.gepafin.tendermanagement.service.UserService;
|
||||
import net.gepafin.tendermanagement.util.Validator;
|
||||
@@ -17,7 +16,6 @@ import net.gepafin.tendermanagement.web.rest.api.errors.CustomValidationExceptio
|
||||
import net.gepafin.tendermanagement.web.rest.api.errors.Status;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -26,10 +24,10 @@ public class BeneficiaryPreferredCallServiceImpl implements BeneficiaryPreferred
|
||||
|
||||
@Autowired
|
||||
private BeneficiaryPreferredCallDao beneficiaryPreferredCallDao;
|
||||
|
||||
@Autowired
|
||||
private Validator validator;
|
||||
@Autowired
|
||||
private UserRepository userRepository;
|
||||
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@@ -37,22 +35,22 @@ public class BeneficiaryPreferredCallServiceImpl implements BeneficiaryPreferred
|
||||
@Override
|
||||
public BeneficiaryPreferredCallResponseBean createBeneficiaryPreferredCall(HttpServletRequest request, BeneficiaryPreferredCallReq beneficiaryPreferredCallRequest) {
|
||||
UserEntity userEntity = validator.validateUser(request);
|
||||
return beneficiaryPreferredCallDao.createBeneficiaryPreferredCall(beneficiaryPreferredCallRequest,userEntity);
|
||||
return beneficiaryPreferredCallDao.createBeneficiaryPreferredCall(request, beneficiaryPreferredCallRequest,userEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BeneficiaryPreferredCallResponseBean getBeneficiaryPreferredCallById(HttpServletRequest request, Long id) {
|
||||
return beneficiaryPreferredCallDao.getBeneficiaryPreferredCallById(id);
|
||||
return beneficiaryPreferredCallDao.getBeneficiaryPreferredCallById(request, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBeneficiaryPreferredCall(HttpServletRequest request, Long id) {
|
||||
beneficiaryPreferredCallDao.deleteBeneficiaryPreferredCallById(id);
|
||||
beneficiaryPreferredCallDao.deleteBeneficiaryPreferredCallById(request, id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BeneficiaryPreferredCallResponseBean> getAllBeneficiaryPreferredCalls(HttpServletRequest request) {
|
||||
return beneficiaryPreferredCallDao.getAllBeneficiaryPreferredCalls();
|
||||
return beneficiaryPreferredCallDao.getAllBeneficiaryPreferredCalls(request);
|
||||
}
|
||||
|
||||
// @Override
|
||||
@@ -68,6 +66,7 @@ public class BeneficiaryPreferredCallServiceImpl implements BeneficiaryPreferred
|
||||
@Override
|
||||
public List<BeneficiaryPreferredCallResponseBean> getBeneficiaryPreferredCallByUserId(HttpServletRequest request,Long userId,Long beneficiaryId,Long companyId) {
|
||||
UserEntity userEntity =validateGetBeneficiaryPreferredCallrequest(request,userId,beneficiaryId);
|
||||
validator.validateUserId(request, userEntity.getId());
|
||||
return beneficiaryPreferredCallDao.getBeneficiaryPreferredCallByUserId(userEntity,companyId);
|
||||
}
|
||||
|
||||
@@ -81,7 +80,7 @@ public class BeneficiaryPreferredCallServiceImpl implements BeneficiaryPreferred
|
||||
}
|
||||
if(beneficiaryId!=null){
|
||||
UserEntity user = userService.getUserByBeneficiaryId(beneficiaryId);
|
||||
return validator.validateUserId(request,user.getId());
|
||||
return validator.validateUserId(request, user.getId());
|
||||
}
|
||||
else{
|
||||
return validator.validateUserId(request, userId);
|
||||
|
||||
@@ -91,13 +91,15 @@ public class CallServiceImpl implements CallService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CallEntity validatePublishedCall(Long callId) {
|
||||
return callDao.validatePublishedCall(callId);
|
||||
public CallEntity validatePublishedCall(Long callId, Long hubId) {
|
||||
return callDao.validatePublishedCall(callId, hubId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public byte[] downloadCallDocumentsAsZip(Long callId) {
|
||||
public byte[] downloadCallDocumentsAsZip(HttpServletRequest request, Long callId) {
|
||||
UserEntity user = validator.validateUser(request);
|
||||
validator.validateUserWithCall(user, callId);
|
||||
return callDao.downloadCallDocumentsAsZip(callId);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ public class CompanyServiceImpl implements CompanyService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CompanyResponse updateCompany(HttpServletRequest request, Long companyId, CompanyRequest companyRequest) {
|
||||
UserEntity userEntity =validator.validateUser(request);
|
||||
validator.validateUserWithCompany(request, companyId);
|
||||
return companyDao.updateCompany(userEntity, companyId, companyRequest);
|
||||
}
|
||||
|
||||
@@ -56,6 +57,7 @@ public class CompanyServiceImpl implements CompanyService {
|
||||
@Transactional(readOnly = true)
|
||||
public CompanyResponse getCompany(HttpServletRequest request, Long companyId) {
|
||||
UserEntity userEntity =validator.validateUser(request);
|
||||
validator.validateUserWithCompany(request, companyId);
|
||||
return companyDao.getCompany(userEntity, companyId);
|
||||
}
|
||||
|
||||
@@ -63,13 +65,14 @@ public class CompanyServiceImpl implements CompanyService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteCompany(HttpServletRequest request, Long companyId) {
|
||||
UserEntity userEntity =validator.validateUser(request);
|
||||
validator.validateUserWithCompany(request, companyId);
|
||||
companyDao.deleteCompany(userEntity, companyId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public List<CompanyResponse> getCompanyByUserId(HttpServletRequest request, Long userId) {
|
||||
validator.validateUser(request);
|
||||
validator.validateUserId(request, userId);
|
||||
return companyDao.getCompanyByUserId(userId);
|
||||
}
|
||||
|
||||
@@ -91,8 +94,7 @@ public class CompanyServiceImpl implements CompanyService {
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public ByteArrayOutputStream downloadCompanyDelegation(HttpServletRequest request, Long companyId, CompanyDelegationRequest companyDelegationRequest) {
|
||||
UserEntity userEntity =validator.validateUser(request);
|
||||
return delegationDao.downloadCompanyDelegation(userEntity, companyId, companyDelegationRequest);
|
||||
return delegationDao.downloadCompanyDelegation(request, companyId, companyDelegationRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -5,6 +5,8 @@ import net.gepafin.tendermanagement.dao.FlowDao;
|
||||
import net.gepafin.tendermanagement.model.request.FlowRequestBean;
|
||||
import net.gepafin.tendermanagement.model.response.FlowResponseBean;
|
||||
import net.gepafin.tendermanagement.service.FlowService;
|
||||
import net.gepafin.tendermanagement.util.Validator;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -14,16 +16,21 @@ public class FlowServiceImpl implements FlowService {
|
||||
|
||||
@Autowired
|
||||
private FlowDao flowDao;
|
||||
|
||||
@Autowired
|
||||
private Validator validator;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public FlowResponseBean createOrUpdateFlow(HttpServletRequest httpServletRequest, FlowRequestBean flowRequestBean, Long callId) {
|
||||
validator.validateUserWithCall(validator.validateUser(httpServletRequest), callId);
|
||||
return flowDao.createOrUpdateFlow(flowRequestBean,callId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@org.springframework.transaction.annotation.Transactional(readOnly = true)
|
||||
public FlowResponseBean getFlowByCallId(HttpServletRequest request, Long callId) {
|
||||
validator.validateUserWithCall(validator.validateUser(request), callId);
|
||||
return flowDao.getFlowByCallId(callId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,12 +3,15 @@ package net.gepafin.tendermanagement.service.impl;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import net.gepafin.tendermanagement.dao.LoginAttemptDao;
|
||||
import net.gepafin.tendermanagement.entities.LoginAttemptEntity;
|
||||
import net.gepafin.tendermanagement.entities.UserEntity;
|
||||
import net.gepafin.tendermanagement.enums.LoginAttemptResultEnum;
|
||||
import net.gepafin.tendermanagement.enums.LoginAttemptTypeEnum;
|
||||
import net.gepafin.tendermanagement.model.request.LoginAttemptReq;
|
||||
import net.gepafin.tendermanagement.model.response.LoginAttemptPageableResponseBean;
|
||||
import net.gepafin.tendermanagement.service.LoginAttemptService;
|
||||
import net.gepafin.tendermanagement.util.Utils;
|
||||
import net.gepafin.tendermanagement.util.Validator;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -19,22 +22,30 @@ public class LoginAttemptServiceImpl implements LoginAttemptService {
|
||||
|
||||
@Autowired
|
||||
LoginAttemptDao loginAttemptDao;
|
||||
|
||||
@Autowired
|
||||
private Validator validator;
|
||||
|
||||
@Override
|
||||
public LoginAttemptPageableResponseBean<List<LoginAttemptEntity>> getLoginAttemptsList(Integer pageNo, Integer pageLimit) {
|
||||
return loginAttemptDao.getLoginAttemptsList(pageNo, pageLimit);
|
||||
public LoginAttemptPageableResponseBean<List<LoginAttemptEntity>> getLoginAttemptsList(HttpServletRequest request, Integer pageNo, Integer pageLimit) {
|
||||
return loginAttemptDao.getLoginAttemptsList(validator.validateUser(request), pageNo, pageLimit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createLoginAttempt(LoginAttemptReq loginAttemptReq, HttpServletRequest request) {
|
||||
String ipAddress = Utils.getClientIpAddress(request);
|
||||
String userAgent = request.getHeader("user-agent");
|
||||
|
||||
LoginAttemptEntity loginAttemptEntity = new LoginAttemptEntity();
|
||||
loginAttemptEntity.setType(LoginAttemptTypeEnum.SWITCH.getValue());
|
||||
loginAttemptEntity.setIpAddress(ipAddress);
|
||||
loginAttemptEntity.setUserAgent(userAgent);
|
||||
loginAttemptEntity.setUsername(loginAttemptReq.getUserName());
|
||||
loginAttemptEntity.setResult(LoginAttemptResultEnum.SUCCESS.getValue());
|
||||
if(loginAttemptReq.getUserId() != null) {
|
||||
UserEntity userEntity = validator.validateUserId(request, loginAttemptReq.getUserId());
|
||||
loginAttemptEntity.setUserId(userEntity.getId());
|
||||
}
|
||||
loginAttemptDao.createLoginAttempt(loginAttemptEntity);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,19 +40,22 @@ public class UserServiceImpl implements UserService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public UserResponseBean updateUser(Long userId, UpdateUserReq userReq) {
|
||||
public UserResponseBean updateUser(HttpServletRequest request, Long userId, UpdateUserReq userReq) {
|
||||
validator.validateUserId(request, userId);
|
||||
return userDao.updateUser(userId, userReq);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public UserResponseBean getUserById(Long userId) {
|
||||
public UserResponseBean getUserById(HttpServletRequest request, Long userId) {
|
||||
validator.validateUserId(request, userId);
|
||||
return userDao.getUserById(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void deleteUser(Long userId) {
|
||||
public void deleteUser(HttpServletRequest request, Long userId) {
|
||||
validator.validateUserId(request, userId);
|
||||
userDao.deleteUser(userId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user