Added log for invalid person
This commit is contained in:
parent
32f002b427
commit
47450009ce
1 changed files with 3 additions and 0 deletions
|
|
@ -3,6 +3,7 @@ package ru.nbch.credit_tracker.service.indic;
|
|||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import ru.nbch.credit_tracker.mapper.indic.PersonMapper;
|
||||
|
|
@ -11,6 +12,7 @@ import java.time.LocalDate;
|
|||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class PersonService {
|
||||
|
||||
|
|
@ -27,6 +29,7 @@ public class PersonService {
|
|||
if (person != null && passort != null && requiredFieldPresent(person, passort)) {
|
||||
return new PersonData(person, passort);
|
||||
} else {
|
||||
log.warn("Person does not have required fields. Fid {}", fid);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue