updated code
This commit is contained in:
@@ -130,7 +130,7 @@ public class CallDao {
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR,Translator.toLocale(GepafinConstant.AMOUNT_GREATER_THAN_ZERO_MSG));
|
||||
}
|
||||
callEntity.setAmountMin(createCallRequest.getAmountMin());
|
||||
if(createCallRequest.getEmail()==null || Boolean.FALSE.equals(Utils.isValidEmail(createCallRequest.getEmail()))){
|
||||
if(createCallRequest.getEmail()!=null && Boolean.FALSE.equals(Utils.isValidEmail(createCallRequest.getEmail()))){
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR,Translator.toLocale(GepafinConstant.VALIDATION_EMAIL,createCallRequest.getEmail()));
|
||||
}
|
||||
callEntity.setEmail(createCallRequest.getEmail());
|
||||
@@ -478,7 +478,7 @@ public class CallDao {
|
||||
if (updateCallRequest.getAmountMin() != null && updateCallRequest.getAmountMin().compareTo(BigDecimal.ZERO) < 0) {
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR,Translator.toLocale(GepafinConstant.AMOUNT_GREATER_THAN_ZERO_MSG));
|
||||
}
|
||||
if(updateCallRequest.getEmail()==null && Boolean.FALSE.equals(Utils.isValidEmail(updateCallRequest.getEmail()))){
|
||||
if(updateCallRequest.getEmail()!=null && Boolean.FALSE.equals(Utils.isValidEmail(updateCallRequest.getEmail()))){
|
||||
throw new CustomValidationException(Status.VALIDATION_ERROR,Translator.toLocale(GepafinConstant.VALIDATION_EMAIL,updateCallRequest.getEmail()));
|
||||
}
|
||||
setIfUpdated(callEntity::getAmountMin, callEntity::setAmountMin, updateCallRequest.getAmountMin());
|
||||
|
||||
Reference in New Issue
Block a user