diff --git a/src/main/java/com/ewp/crm/controllers/StudentController.java b/src/main/java/com/ewp/crm/controllers/StudentController.java index 3a669ca92..854fdffe9 100644 --- a/src/main/java/com/ewp/crm/controllers/StudentController.java +++ b/src/main/java/com/ewp/crm/controllers/StudentController.java @@ -44,10 +44,11 @@ public ModelAndView showAllStudents(@AuthenticationPrincipal User userFromSessio } else { modelAndView.addObject("defaultStatusForRejectedStudent", ""); } - modelAndView.addObject("students", studentService.getAll()); + modelAndView.addObject("students", studentService.getAll()); //Надо закомментировать, так как будет использоваться рест! modelAndView.addObject("statuses", statusService.getAll()); modelAndView.addObject("emailTmpl", messageTemplateService.getAll()); modelAndView.addObject("slackWorkspaceUrl", slackService.getSlackWorkspaceUrl()); return modelAndView; } + } diff --git a/src/main/java/com/ewp/crm/controllers/rest/StudentRestController.java b/src/main/java/com/ewp/crm/controllers/rest/StudentRestController.java index 5f4ca2c8c..979d65934 100644 --- a/src/main/java/com/ewp/crm/controllers/rest/StudentRestController.java +++ b/src/main/java/com/ewp/crm/controllers/rest/StudentRestController.java @@ -61,6 +61,8 @@ public class StudentRestController { private final ClientStatusChangingHistoryService clientStatusChangingHistoryService; + + @Autowired public StudentRestController(StudentService studentService, ClientService clientService, ClientHistoryService clientHistoryService, StudentStatusService studentStatusService, @@ -259,4 +261,12 @@ private void updateNotification(boolean status, Long id, User userFromSession, H studentService.update(current); clientService.updateClient(client); } + + @GetMapping("/all") + public ResponseEntity getStudentDtoForPageOfAll() { + if (studentService.getStudentDtoForAllStudentsPage() == null) { + return new ResponseEntity(HttpStatus.NOT_FOUND); + } + return ResponseEntity.ok(studentService.getStudentDtoForAllStudentsPage()); + } } diff --git a/src/main/java/com/ewp/crm/models/dto/all_students_page/ClientDtoForAllStudentsPage.java b/src/main/java/com/ewp/crm/models/dto/all_students_page/ClientDtoForAllStudentsPage.java new file mode 100644 index 000000000..1f4656aef --- /dev/null +++ b/src/main/java/com/ewp/crm/models/dto/all_students_page/ClientDtoForAllStudentsPage.java @@ -0,0 +1,133 @@ +package com.ewp.crm.models.dto.all_students_page; + +import com.ewp.crm.models.Client; +import com.ewp.crm.models.SocialProfile; +import com.ewp.crm.models.dto.StatusDto; +import com.ewp.crm.util.Constants; + +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +/** + * Этот класс нужен для страницы "Все страницы", чтобы собрать необходимую информацию о клиенте. + * Поля клиента, которые используются в all-students-table.html: + * a) status + * b) name + * c) lastName + * d) email + * e) phoneNumber + * f) socialProfiles + * g) id + */ +public class ClientDtoForAllStudentsPage { + + private long id; + private String name; + private String lastName; + private String phoneNumber; + private StatusDto statusDto; + private String email; + private List socialNetworkDtos = new ArrayList<>(); + + + public ClientDtoForAllStudentsPage() { + } + + public ClientDtoForAllStudentsPage(long id, String name, String lastName, String phoneNumber, StatusDto statusDto, String email, List socialNetworkDtos) { + this.id = id; + this.name = name; + this.lastName = lastName; + this.phoneNumber = phoneNumber; + this.statusDto = statusDto; + this.email = email; + this.socialNetworkDtos = socialNetworkDtos; + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public StatusDto getStatusDto() { + return statusDto; + } + + public void setStatusDto(StatusDto statusDto) { + this.statusDto = statusDto; + } + + public List getSocialProfilesDto() { + return socialNetworkDtos; + } + + public void setSocialProfiles(List socialNetworkDtos) { + this.socialNetworkDtos = socialNetworkDtos; + } + + /** + * Данный метод получает клиента и на выходе дает DTO этого клиента, необходим для работы с - StudentDto.java, + * @param client - получаемый клиент, + * @return - возвращаемый клиент. + */ + public static ClientDtoForAllStudentsPage getClientDtoForAllStudentsPage(Client client) { + ClientDtoForAllStudentsPage clientDtoForAllStudentsPage = new ClientDtoForAllStudentsPage(); + + clientDtoForAllStudentsPage.id = client.getId(); + clientDtoForAllStudentsPage.name = client.getName(); + clientDtoForAllStudentsPage.lastName = client.getLastName(); + + Optional emailOptional = client.getEmail(); + clientDtoForAllStudentsPage.email = emailOptional.orElse(Constants.EMPTY_STRING); + Optional phoneNumberOptional = client.getPhoneNumber(); + clientDtoForAllStudentsPage.phoneNumber = phoneNumberOptional.orElse(Constants.EMPTY_STRING); + + clientDtoForAllStudentsPage.socialNetworkDtos = SocialNetworkDto.getSocialNetworkDtos(client.getSocialProfiles()); + clientDtoForAllStudentsPage.statusDto = StatusDto.getStatusDto(client.getStatus()); + + return clientDtoForAllStudentsPage; + } + + public static List getListClientDtoForAllStudentsPage(List clients) { + return clients + .stream() + .map(ClientDtoForAllStudentsPage::getClientDtoForAllStudentsPage) + .collect(Collectors.toList()); + } +} diff --git a/src/main/java/com/ewp/crm/models/dto/all_students_page/SocialNetworkDto.java b/src/main/java/com/ewp/crm/models/dto/all_students_page/SocialNetworkDto.java new file mode 100644 index 000000000..3f375301d --- /dev/null +++ b/src/main/java/com/ewp/crm/models/dto/all_students_page/SocialNetworkDto.java @@ -0,0 +1,63 @@ +package com.ewp.crm.models.dto.all_students_page; + +import com.ewp.crm.models.SocialProfile; + +import java.util.List; +import java.util.stream.Collectors; + +public class SocialNetworkDto { + private long id; + private String socialId; + private SocialProfile.SocialNetworkType socialNetworkType; + + public SocialNetworkDto() { + } + + public SocialNetworkDto(long id, String socialId, SocialProfile.SocialNetworkType socialNetworkType) { + this.id = id; + this.socialId = socialId; + this.socialNetworkType = socialNetworkType; + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getSocialId() { + return socialId; + } + + public void setSocialId(String socialId) { + this.socialId = socialId; + } + + public SocialProfile.SocialNetworkType getSocialNetworkType() { + return socialNetworkType; + } + + public void setSocialNetworkType(SocialProfile.SocialNetworkType socialNetworkType) { + this.socialNetworkType = socialNetworkType; + } + + public static SocialNetworkDto getSocialNetworkDto(SocialProfile socialProfile) { + SocialNetworkDto socialNetworkDto = new SocialNetworkDto(); + + socialNetworkDto.id = socialProfile.getId(); + socialNetworkDto.socialId = socialProfile.getSocialId(); + socialNetworkDto.socialNetworkType = socialProfile.getSocialNetworkType(); + + return socialNetworkDto; + } + + public static List getSocialNetworkDtos(List socialProfiles) { + return socialProfiles + .stream() + .map(SocialNetworkDto::getSocialNetworkDto) + .collect(Collectors.toList()); + + } +} diff --git a/src/main/java/com/ewp/crm/models/dto/all_students_page/StudentDto.java b/src/main/java/com/ewp/crm/models/dto/all_students_page/StudentDto.java new file mode 100644 index 000000000..57c597b56 --- /dev/null +++ b/src/main/java/com/ewp/crm/models/dto/all_students_page/StudentDto.java @@ -0,0 +1,230 @@ +package com.ewp.crm.models.dto.all_students_page; + +import com.ewp.crm.models.Student; +import com.ewp.crm.models.StudentStatus; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Данный класс предназначен для отображения информации о студенитах на вкладке "Все студенты" + * Поля, которые есть в all-students-table.html: + * * 1. id + * * 2. color + * * 3. client: + * * a) status + * * b) name + * * c) lastName + * * d) email + * * e) phoneNumber + * * f) socialProfiles + * * g) id + * * 4. trialEndDate + * * 5. nextPaymentDate + * * 6. price + * * 7. paymentAmount + * * 8. payLater + * * 9. notifyEmail + * * 10. notifySms + * * 11. notifyVK + * * 12. notifySlack + * * 13. notes + */ +public class StudentDto { + + private long id; + private ClientDtoForAllStudentsPage clientDtoForAllStudentsPage; + private String notes; + private String color; + private LocalDateTime trialEndDate; + private LocalDateTime nextPaymentDate; + private BigDecimal price; + private BigDecimal paymentAmount; + private BigDecimal payLater; + private boolean notifyEmail = false; + private boolean notifySMS = false; + private boolean notifyVK = false; + private boolean notifySlack = false; + private StudentStatusDto studentStatusDto; + + public StudentDto() { + } + + public StudentDto(long id, + ClientDtoForAllStudentsPage clientDtoForAllStudentsPage, + String notes, + String color, + LocalDateTime trialEndDate, + LocalDateTime nextPaymentDate, + BigDecimal price, + BigDecimal paymentAmount, + BigDecimal payLater, + boolean notifyEmail, + boolean notifySMS, + boolean notifyVK, + boolean notifySlack, + StudentStatusDto studentStatusDto) { + this.id = id; + this.clientDtoForAllStudentsPage = clientDtoForAllStudentsPage; + this.notes = notes; + this.color = color; + this.trialEndDate = trialEndDate; + this.nextPaymentDate = nextPaymentDate; + this.price = price; + this.paymentAmount = paymentAmount; + this.payLater = payLater; + this.notifyEmail = notifyEmail; + this.notifySMS = notifySMS; + this.notifyVK = notifyVK; + this.notifySlack = notifySlack; + this.studentStatusDto = studentStatusDto; + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public ClientDtoForAllStudentsPage getClientDtoForAllStudentsPage() { + return clientDtoForAllStudentsPage; + } + + public void setClientDtoForAllStudentsPage(ClientDtoForAllStudentsPage clientDtoForAllStudentsPage) { + this.clientDtoForAllStudentsPage = clientDtoForAllStudentsPage; + } + + public String getNotes() { + return notes; + } + + public void setNotes(String notes) { + this.notes = notes; + } + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + public LocalDateTime getTrialEndDate() { + return trialEndDate; + } + + public void setTrialEndDate(LocalDateTime trialEndDate) { + this.trialEndDate = trialEndDate; + } + + public LocalDateTime getNextPaymentDate() { + return nextPaymentDate; + } + + public void setNextPaymentDate(LocalDateTime nextPaymentDate) { + this.nextPaymentDate = nextPaymentDate; + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public BigDecimal getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(BigDecimal paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public BigDecimal getPayLater() { + return payLater; + } + + public void setPayLater(BigDecimal payLater) { + this.payLater = payLater; + } + + public boolean isNotifyEmail() { + return notifyEmail; + } + + public void setNotifyEmail(boolean notifyEmail) { + this.notifyEmail = notifyEmail; + } + + public boolean isNotifySMS() { + return notifySMS; + } + + public void setNotifySMS(boolean notifySMS) { + this.notifySMS = notifySMS; + } + + public boolean isNotifyVK() { + return notifyVK; + } + + public void setNotifyVK(boolean notifyVK) { + this.notifyVK = notifyVK; + } + + public boolean isNotifySlack() { + return notifySlack; + } + + public void setNotifySlack(boolean notifySlack) { + this.notifySlack = notifySlack; + } + + public StudentStatusDto getStudentStatusDto() { + return studentStatusDto; + } + + public void setStudentStatusDto(StudentStatus studentStatus) { + this.studentStatusDto = studentStatusDto; + } + + /** + * Данный класс предназначен для работы со страницей "Все студенты" + * @param student - принимаемый студент, + * @return - возвращаемый студент. + */ + public static StudentDto getStudentDtoForAllStudentsPage(Student student) { + StudentDto studentDto = new StudentDto(); + + studentDto.id = student.getId(); + studentDto.clientDtoForAllStudentsPage = + ClientDtoForAllStudentsPage.getClientDtoForAllStudentsPage(student.getClient()); + studentDto.notes = student.getNotes(); + studentDto.color = student.getColor(); + studentDto.trialEndDate = student.getTrialEndDate(); + studentDto.nextPaymentDate = student.getNextPaymentDate(); + studentDto.price = student.getPrice(); + studentDto.paymentAmount = student.getPaymentAmount(); + studentDto.payLater = student.getPayLater(); + studentDto.notifyEmail = student.isNotifyEmail(); + studentDto.notifySMS = student.isNotifySMS(); + studentDto.notifyVK = student.isNotifyVK(); + studentDto.notifySlack = student.isNotifySlack(); + studentDto.studentStatusDto = StudentStatusDto.getStudentStatusDto(student.getStatus()); + + return studentDto; + } + + public static List getStudentDtoForAllStudentsPage(List students) { + return students + .stream() + .map(StudentDto::getStudentDtoForAllStudentsPage) + .collect(Collectors.toList()); + } +} diff --git a/src/main/java/com/ewp/crm/models/dto/all_students_page/StudentStatusDto.java b/src/main/java/com/ewp/crm/models/dto/all_students_page/StudentStatusDto.java new file mode 100644 index 000000000..3fe0b7129 --- /dev/null +++ b/src/main/java/com/ewp/crm/models/dto/all_students_page/StudentStatusDto.java @@ -0,0 +1,42 @@ +package com.ewp.crm.models.dto.all_students_page; + +import com.ewp.crm.models.Status; +import com.ewp.crm.models.StudentStatus; + +public class StudentStatusDto { + private long id; + private String status; + + public StudentStatusDto() { + } + + public StudentStatusDto(long id, String status) { + this.id = id; + this.status = status; + } + + public long getId() { + return id; + } + + public void setId(long id) { + this.id = id; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public static StudentStatusDto getStudentStatusDto(StudentStatus studentStatus) { + StudentStatusDto studentStatusDto = new StudentStatusDto(); + + studentStatusDto.id = studentStatus.getId(); + studentStatusDto.status = studentStatus.getStatus(); + + return studentStatusDto; + } +} diff --git a/src/main/java/com/ewp/crm/repository/impl/StudentRepositoryImpl.java b/src/main/java/com/ewp/crm/repository/impl/StudentRepositoryImpl.java index e7fed945f..a53ffb635 100644 --- a/src/main/java/com/ewp/crm/repository/impl/StudentRepositoryImpl.java +++ b/src/main/java/com/ewp/crm/repository/impl/StudentRepositoryImpl.java @@ -1,8 +1,17 @@ package com.ewp.crm.repository.impl; +import com.ewp.crm.models.SocialProfile; import com.ewp.crm.models.SocialProfile.SocialNetworkType; import com.ewp.crm.models.Student; +import com.ewp.crm.models.StudentStatus; +import com.ewp.crm.models.dto.StatusDto; +import com.ewp.crm.models.dto.all_students_page.ClientDtoForAllStudentsPage; +import com.ewp.crm.models.dto.all_students_page.SocialNetworkDto; +import com.ewp.crm.models.dto.all_students_page.StudentDto; +import com.ewp.crm.models.dto.all_students_page.StudentStatusDto; import com.ewp.crm.repository.interfaces.StudentRepositoryCustom; +import org.apache.poi.poifs.crypt.dsig.services.TimeStampService; +import org.apache.poi.poifs.crypt.dsig.services.TimeStampServiceValidator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -10,10 +19,14 @@ import org.springframework.transaction.annotation.Transactional; import javax.persistence.EntityManager; +import javax.persistence.Tuple; +import java.math.BigDecimal; import java.math.BigInteger; +import java.sql.Timestamp; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.ZonedDateTime; +import java.util.ArrayList; import java.util.List; @Repository @@ -69,4 +82,131 @@ public void detach(Student student) { public void resetColors() { entityManager.createQuery("UPDATE Student s SET s.color = null WHERE s.color IS NOT null").executeUpdate(); } + + @Override + public List getStudentDtoForAllStudentsPage() { + + List result = new ArrayList<>(); + + List tupleStudents = entityManager.createNativeQuery( + "SELECT s.id AS id, s.notes AS notes, s.color AS color, s.end_trial AS trialEndDate, " + + "s.next_pay AS nextPaymentDate, s.price AS price, s.amount AS payment_amount, " + + "s.later AS payLater, s.notify_email AS notifyEmail, s.notify_sms AS notifySms, " + + "s.notify_vk AS notifyVK, s.notify_slack AS notifySlack, " + + //Поля для клиента + "c.client_id AS client_id, c.first_name AS first_name, c.last_name AS last_name, " + + "c.phone_number AS phoneNumber, c.email AS clientEmail, " + + "ss.id AS studentStatusId, ss.status AS studentStatusName, " + + // Поля для статуса + "st.status_id AS statusID, st.status_name AS statusName " + + + "FROM student s, " + + "student_status ss, " + + "client c, " + + "status st, " + + "status_clients sc " + + + "WHERE s.client_id = c.client_id " + + "AND s.status_id = ss.id " + + "AND st.status_id = sc.status_id " + + "AND c.client_id = sc.user_id;" + + , Tuple.class).getResultList(); + + for (Tuple tuple : tupleStudents) { + //Поля для StudentDto + long studentID = ((BigInteger) tuple.get("id")).longValue(); + String notes = tuple.get("notes") == null ? "" : (String) tuple.get("notes"); + String color = tuple.get("color") == null ? "" : (String) tuple.get("color"); + LocalDateTime trialEndDate = ((Timestamp) tuple.get("trialEndDate")).toLocalDateTime(); + LocalDateTime nextPaymentDate = ((Timestamp) tuple.get("nextPaymentDate")).toLocalDateTime(); + BigDecimal price = ((BigDecimal) tuple.get("price")); + BigDecimal paymentAmount = ((BigDecimal) tuple.get("payment_amount")); + BigDecimal payLater = ((BigDecimal) tuple.get("payLater")); + boolean notifyEmail = (boolean) tuple.get("notifyEmail"); + boolean notifySms = (boolean) tuple.get("notifySms"); + boolean notifyVK = (boolean) tuple.get("notifyVK"); + boolean notifySlack = (boolean) tuple.get("notifySlack"); + long studentStatusId = ((BigInteger) tuple.get("studentStatusId")).longValue(); + String studentStatusName = tuple.get("studentStatusName") == null ? "" : (String) tuple.get("studentStatusName"); + //Создать StudentStatus по имени studentStatusName и добавить студенту. + + //Поля для ClientDtoForAllStudentsPage + long clientId = ((BigInteger) tuple.get("client_id")).longValue(); + String firstName = tuple.get("first_name") == null ? "" : (String) tuple.get("first_name"); + String lastName = tuple.get("last_name") == null ? "" : (String) tuple.get("last_name"); + String phoneNumber = tuple.get("phoneNumber") == null ? "" : (String) tuple.get("phoneNumber"); + String email = tuple.get("clientEmail") == null ? "" : (String) tuple.get("clientEmail"); + long statusID = ((BigInteger) tuple.get("statusID")).longValue(); + String statusName = tuple.get("statusName") == null ? "" : (String) tuple.get("statusName"); + + List profiles = getStudentProfiles(clientId); + + + ClientDtoForAllStudentsPage clientDtoForAllStudentsPage = + new ClientDtoForAllStudentsPage( + clientId, + firstName, + lastName, + phoneNumber, + new StatusDto(statusID, statusName), + email, + profiles + ); + //Конец создания клиента. + + //StudentDTO + StudentDto studentDto = new StudentDto( + studentID, + clientDtoForAllStudentsPage, + notes, + color, + trialEndDate, + nextPaymentDate, + price, + paymentAmount, + payLater, + notifyEmail, + notifySms, + notifyVK, + notifySlack, + new StudentStatusDto(studentStatusId, studentStatusName) + ); + //End + + result.add(studentDto); + } + + return result; + } + + /** + * Если id соц.сети не нужны, то можно удалить ДТО соц.сети и использовать + * непосредственно сам класс SocialProfile.java + * @param clientId - получаем при прогонке по циклу студентов в методе getStudentDtoForAllStudentsPage(). + * @return + */ + private List getStudentProfiles(long clientId) { + List profiles = new ArrayList<>(); + List socialProfiles = entityManager.createNativeQuery( + "SELECT sn.id AS trueSocialID," + + " sn.social_id AS socialID," + + " sn.social_network_type AS networkType " + + + "FROM social_network sn," + + " client_social_network csn " + + + "WHERE " + clientId + " = csn.client_id " + + " AND csn.social_network_id = sn.id;" + , Tuple.class).getResultList(); + + for (Tuple studentProfile : socialProfiles) { + long trueSocialId = ((BigInteger) studentProfile.get("trueSocialId")).longValue(); + String socialId = studentProfile.get("socialID") == null ? "" : (String) studentProfile.get("socialID"); + String socialNetworkType = studentProfile.get("networkType") == null ? "" : (String) studentProfile.get("networkType"); + profiles.add(new SocialNetworkDto(trueSocialId, socialId, SocialNetworkType.valueOf(socialNetworkType))); + } + + return profiles; + } } diff --git a/src/main/java/com/ewp/crm/repository/interfaces/StudentRepositoryCustom.java b/src/main/java/com/ewp/crm/repository/interfaces/StudentRepositoryCustom.java index 73d5ae0be..187f89791 100644 --- a/src/main/java/com/ewp/crm/repository/interfaces/StudentRepositoryCustom.java +++ b/src/main/java/com/ewp/crm/repository/interfaces/StudentRepositoryCustom.java @@ -2,6 +2,7 @@ import com.ewp.crm.models.SocialProfile.SocialNetworkType; import com.ewp.crm.models.Student; +import com.ewp.crm.models.dto.all_students_page.StudentDto; import java.time.ZonedDateTime; import java.util.List; @@ -17,4 +18,6 @@ public interface StudentRepositoryCustom { void detach(Student student); void resetColors(); + + List getStudentDtoForAllStudentsPage(); } diff --git a/src/main/java/com/ewp/crm/service/impl/StudentServiceImpl.java b/src/main/java/com/ewp/crm/service/impl/StudentServiceImpl.java index 496336973..6b3354594 100644 --- a/src/main/java/com/ewp/crm/service/impl/StudentServiceImpl.java +++ b/src/main/java/com/ewp/crm/service/impl/StudentServiceImpl.java @@ -4,6 +4,7 @@ import com.ewp.crm.models.SocialProfile.SocialNetworkType; import com.ewp.crm.models.Student; import com.ewp.crm.models.StudentStatus; +import com.ewp.crm.models.dto.all_students_page.StudentDto; import com.ewp.crm.repository.interfaces.StudentRepository; import com.ewp.crm.repository.interfaces.StudentRepositoryCustom; import com.ewp.crm.service.interfaces.ProjectPropertiesService; @@ -109,4 +110,10 @@ public Student getStudentByEmail(String email) { return studentRepository.getStudentByEmail(email); } + @Override + public List getStudentDtoForAllStudentsPage() { + return studentRepositoryCustom.getStudentDtoForAllStudentsPage(); + } + + } diff --git a/src/main/java/com/ewp/crm/service/interfaces/StudentService.java b/src/main/java/com/ewp/crm/service/interfaces/StudentService.java index 1e3166b89..1215fa5c3 100644 --- a/src/main/java/com/ewp/crm/service/interfaces/StudentService.java +++ b/src/main/java/com/ewp/crm/service/interfaces/StudentService.java @@ -3,6 +3,7 @@ import com.ewp.crm.models.Client; import com.ewp.crm.models.SocialProfile.SocialNetworkType; import com.ewp.crm.models.Student; +import com.ewp.crm.models.dto.all_students_page.StudentDto; import java.time.ZonedDateTime; import java.util.List; @@ -30,4 +31,5 @@ public interface StudentService extends CommonService { Student getStudentByEmail(String email); + List getStudentDtoForAllStudentsPage(); }