Изменилась логика отправки ответа

This commit is contained in:
Mark Struchkov 2019-01-21 13:12:17 +03:00
parent 06a7131aba
commit 06818e6656
2 changed files with 9 additions and 1 deletions

View File

@ -28,10 +28,15 @@ public class Autoresponder {
Unit unit;
if (person.getUnit() == null) {
unit = nextUnit(unitService.menuUnit(), message);
person.setUnit(unit);
} else {
unit = nextUnit(person.getUnit().getNextUnits(), message);
}
if (unit == null) {
return null;
} else {
person.setUnit(unit);
}
}
return unit;
}

View File

@ -1,9 +1,11 @@
package org.sadtech.autoresponder.service.impl;
import lombok.extern.log4j.Log4j;
import org.sadtech.autoresponder.entity.Person;
import org.sadtech.autoresponder.repository.PersonRepository;
import org.sadtech.autoresponder.service.PersonService;
@Log4j
public class PersonServiceImpl implements PersonService {
private PersonRepository personRepository;
@ -20,6 +22,7 @@ public class PersonServiceImpl implements PersonService {
@Override
public void addPerson(Person person) {
personRepository.addPerson(person);
log.info("Пользователь отправлен в репозиторий");
}
@Override