Beneficiary GDPR
This commit is contained in:
@@ -83,6 +83,15 @@ public class UserDao {
|
||||
beneficiaryEntity.setLastName(userReq.getLastName());
|
||||
beneficiaryEntity.setOrganization(userReq.getOrganization());
|
||||
beneficiaryEntity.setPhoneNumber(userReq.getPhoneNumber());
|
||||
beneficiaryEntity.setGdprRead(userReq.getGdprRead());
|
||||
beneficiaryEntity.setGdprComunicazione(userReq.getGdprComunicazione());
|
||||
beneficiaryEntity.setGdprElaborazione(userReq.getGdprElaborazione());
|
||||
beneficiaryEntity.setGdprMateriale(userReq.getGdprMateriale());
|
||||
beneficiaryEntity.setPrivacy(userReq.getPrivacy());
|
||||
beneficiaryEntity.setTerms(userReq.getTerms());
|
||||
beneficiaryEntity.setOffers(userReq.getOffers());
|
||||
beneficiaryEntity.setMarketing(userReq.getMarketing());
|
||||
beneficiaryEntity.setThirdParty(userReq.getThirdParty());
|
||||
beneficiaryEntity =beneficiaryRepository.save(beneficiaryEntity);
|
||||
}
|
||||
return beneficiaryEntity;
|
||||
@@ -148,6 +157,14 @@ public class UserDao {
|
||||
setIfUpdated(userEntity::getOrganization, userEntity::setOrganization, userReq.getOrganization());
|
||||
setIfUpdated(userEntity::getAddress, userEntity::setAddress, userReq.getAddress());
|
||||
setIfUpdated(userEntity::getPhoneNumber, userEntity::setPhoneNumber, userReq.getPhoneNumber());
|
||||
setIfUpdated(userEntity::getDateOfBirth, userEntity::setDateOfBirth, userReq.getDateOfBirth());
|
||||
setIfUpdated(userEntity.getBeneficiary()::getCodiceFiscale, userEntity.getBeneficiary()::setCodiceFiscale, userReq.getCodiceFiscale());
|
||||
setIfUpdated(userEntity.getBeneficiary()::getGdprComunicazione, userEntity.getBeneficiary()::setGdprComunicazione, userReq.getGdprComunicazione());
|
||||
setIfUpdated(userEntity.getBeneficiary()::getGdprElaborazione, userEntity.getBeneficiary()::setGdprElaborazione, userReq.getGdprElaborazione());
|
||||
setIfUpdated(userEntity.getBeneficiary()::getGdprMateriale, userEntity.getBeneficiary()::setGdprMateriale, userReq.getGdprMateriale());
|
||||
setIfUpdated(userEntity.getBeneficiary()::getMarketing, userEntity.getBeneficiary()::setMarketing, userReq.getMarketing());
|
||||
setIfUpdated(userEntity.getBeneficiary()::getOffers, userEntity.getBeneficiary()::setOffers, userReq.getOffers());
|
||||
setIfUpdated(userEntity.getBeneficiary()::getThirdParty, userEntity.getBeneficiary()::setThirdParty, userReq.getThirdParty());
|
||||
if (userReq.getRoleId() != null) {
|
||||
RoleEntity roleEntity = roleDao.validateRole(userReq.getRoleId());
|
||||
setIfUpdated(userEntity::getRoleEntity, userEntity::setRoleEntity, roleEntity);
|
||||
@@ -167,6 +184,7 @@ public class UserDao {
|
||||
userEntity.setStatus(UserStatusEnum.ACTIVE.getValue());
|
||||
userEntity.setBeneficiary(beneficiary);
|
||||
if (Boolean.FALSE.equals(RoleStatusEnum.ROLE_BENEFICIARY.getValue().equals(roleEntity.getRoleType()))) {
|
||||
|
||||
userEntity.setFirstName(userReq.getFirstName());
|
||||
userEntity.setLastName(userReq.getLastName());
|
||||
userEntity.setOrganization(userReq.getOrganization());
|
||||
@@ -216,6 +234,15 @@ public class UserDao {
|
||||
userResponseBean.setCountry(userEntity.getBeneficiary().getCountry());
|
||||
userResponseBean.setCodiceFiscale(userEntity.getBeneficiary().getCodiceFiscale());
|
||||
userResponseBean.setDateOfBirth(userEntity.getBeneficiary().getDateOfBirth());
|
||||
userResponseBean.setGdprRead(userEntity.getBeneficiary().getGdprRead());
|
||||
userResponseBean.setGdprComunicazione(userEntity.getBeneficiary().getGdprComunicazione());
|
||||
userResponseBean.setGdprElaborazione(userEntity.getBeneficiary().getGdprElaborazione());
|
||||
userResponseBean.setGdprMateriale(userEntity.getBeneficiary().getGdprMateriale());
|
||||
userResponseBean.setPrivacy(userEntity.getBeneficiary().getPrivacy());
|
||||
userResponseBean.setTerms(userEntity.getBeneficiary().getTerms());
|
||||
userResponseBean.setOffers(userEntity.getBeneficiary().getOffers());
|
||||
userResponseBean.setMarketing(userEntity.getBeneficiary().getMarketing());
|
||||
userResponseBean.setThirdParty(userEntity.getBeneficiary().getThirdParty());
|
||||
}
|
||||
return userResponseBean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user