From 1a19f1f88d7c31860195b220bd1e556d855224a1 Mon Sep 17 00:00:00 2001 From: Mark Struchkov Date: Mon, 31 Dec 2018 12:35:16 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20=D1=81?= =?UTF-8?q?=20=D0=B1=D0=B0=D0=B7=D0=BE=D0=B9=20=D0=B8=20=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=BC=D0=B5=D1=89=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ => database}/entity/Message.java | 5 ++++- .../{ => database}/entity/NextUnit.java | 4 +++- .../{ => database}/entity/SaveUnit.java | 2 +- .../{ => database}/entity/SocialNetworks.java | 2 +- .../consultant/{ => database}/entity/Unit.java | 2 +- .../consultant/{ => database}/entity/User.java | 5 ++--- .../repository/MessageRepository.java | 4 ++-- .../repository/NextUnitRepositoriy.java | 4 ++-- .../repository/SaveUnitRepositoriy.java | 4 ++-- .../repository/SocialNetworksRepositoriy.java | 4 ++-- .../repository/UnitRepositoriy.java | 4 ++-- .../repository/UserRepositoriy.java | 4 ++-- .../database/service/MessageService.java | 8 ++++++++ .../database/service/NextUnitService.java | 4 ++++ .../database/service/SaveUnitService.java | 4 ++++ .../service/SocialNetworksService.java | 4 ++++ .../database/service/UnitService.java | 10 ++++++++++ .../database/service/UserService.java | 10 ++++++++++ .../service/impl/MessageServiceImpl.java | 18 ++++++++++++++++++ .../service/impl/NextUnitServiceImpl.java | 6 +++--- .../service/impl/SaveUnitServiceImpl.java | 6 +++--- .../impl/SocialNetworksServiceImpl.java | 6 +++--- .../service/impl/UnitServiceImpl.java | 8 ++++---- .../service/impl/UserServiceImpl.java | 8 ++++---- .../consultant/service/MessageService.java | 8 -------- .../consultant/service/NextUnitService.java | 4 ---- .../consultant/service/SaveUnitService.java | 4 ---- .../service/SocialNetworksService.java | 4 ---- .../consultant/service/UnitService.java | 10 ---------- .../consultant/service/UserService.java | 10 ---------- .../service/impl/MessageServiceImpl.java | 16 ---------------- 31 files changed, 99 insertions(+), 93 deletions(-) rename src/main/java/org/sadtech/consultant/{ => database}/entity/Message.java (61%) rename src/main/java/org/sadtech/consultant/{ => database}/entity/NextUnit.java (62%) rename src/main/java/org/sadtech/consultant/{ => database}/entity/SaveUnit.java (79%) rename src/main/java/org/sadtech/consultant/{ => database}/entity/SocialNetworks.java (81%) rename src/main/java/org/sadtech/consultant/{ => database}/entity/Unit.java (81%) rename src/main/java/org/sadtech/consultant/{ => database}/entity/User.java (68%) rename src/main/java/org/sadtech/consultant/{ => database}/repository/MessageRepository.java (56%) rename src/main/java/org/sadtech/consultant/{ => database}/repository/NextUnitRepositoriy.java (57%) rename src/main/java/org/sadtech/consultant/{ => database}/repository/SaveUnitRepositoriy.java (56%) rename src/main/java/org/sadtech/consultant/{ => database}/repository/SocialNetworksRepositoriy.java (57%) rename src/main/java/org/sadtech/consultant/{ => database}/repository/UnitRepositoriy.java (56%) rename src/main/java/org/sadtech/consultant/{ => database}/repository/UserRepositoriy.java (56%) create mode 100644 src/main/java/org/sadtech/consultant/database/service/MessageService.java create mode 100644 src/main/java/org/sadtech/consultant/database/service/NextUnitService.java create mode 100644 src/main/java/org/sadtech/consultant/database/service/SaveUnitService.java create mode 100644 src/main/java/org/sadtech/consultant/database/service/SocialNetworksService.java create mode 100644 src/main/java/org/sadtech/consultant/database/service/UnitService.java create mode 100644 src/main/java/org/sadtech/consultant/database/service/UserService.java create mode 100644 src/main/java/org/sadtech/consultant/database/service/impl/MessageServiceImpl.java rename src/main/java/org/sadtech/consultant/{ => database}/service/impl/NextUnitServiceImpl.java (56%) rename src/main/java/org/sadtech/consultant/{ => database}/service/impl/SaveUnitServiceImpl.java (56%) rename src/main/java/org/sadtech/consultant/{ => database}/service/impl/SocialNetworksServiceImpl.java (56%) rename src/main/java/org/sadtech/consultant/{ => database}/service/impl/UnitServiceImpl.java (60%) rename src/main/java/org/sadtech/consultant/{ => database}/service/impl/UserServiceImpl.java (67%) delete mode 100644 src/main/java/org/sadtech/consultant/service/MessageService.java delete mode 100644 src/main/java/org/sadtech/consultant/service/NextUnitService.java delete mode 100644 src/main/java/org/sadtech/consultant/service/SaveUnitService.java delete mode 100644 src/main/java/org/sadtech/consultant/service/SocialNetworksService.java delete mode 100644 src/main/java/org/sadtech/consultant/service/UnitService.java delete mode 100644 src/main/java/org/sadtech/consultant/service/UserService.java delete mode 100644 src/main/java/org/sadtech/consultant/service/impl/MessageServiceImpl.java diff --git a/src/main/java/org/sadtech/consultant/entity/Message.java b/src/main/java/org/sadtech/consultant/database/entity/Message.java similarity index 61% rename from src/main/java/org/sadtech/consultant/entity/Message.java rename to src/main/java/org/sadtech/consultant/database/entity/Message.java index 454188f..e729d25 100644 --- a/src/main/java/org/sadtech/consultant/entity/Message.java +++ b/src/main/java/org/sadtech/consultant/database/entity/Message.java @@ -1,8 +1,9 @@ -package org.sadtech.consultant.entity; +package org.sadtech.consultant.database.entity; import lombok.Data; import javax.persistence.Entity; +import javax.persistence.GeneratedValue; import javax.persistence.Id; @Data @@ -10,9 +11,11 @@ import javax.persistence.Id; public class Message { @Id + @GeneratedValue private Long idMess; private Long idUser; private String text; + private String date; } diff --git a/src/main/java/org/sadtech/consultant/entity/NextUnit.java b/src/main/java/org/sadtech/consultant/database/entity/NextUnit.java similarity index 62% rename from src/main/java/org/sadtech/consultant/entity/NextUnit.java rename to src/main/java/org/sadtech/consultant/database/entity/NextUnit.java index 922cd20..64281d3 100644 --- a/src/main/java/org/sadtech/consultant/entity/NextUnit.java +++ b/src/main/java/org/sadtech/consultant/database/entity/NextUnit.java @@ -1,13 +1,15 @@ -package org.sadtech.consultant.entity; +package org.sadtech.consultant.database.entity; import lombok.Data; import javax.persistence.Entity; +import javax.persistence.Id; @Entity @Data public class NextUnit { + @Id private Long id; private Long idNext; diff --git a/src/main/java/org/sadtech/consultant/entity/SaveUnit.java b/src/main/java/org/sadtech/consultant/database/entity/SaveUnit.java similarity index 79% rename from src/main/java/org/sadtech/consultant/entity/SaveUnit.java rename to src/main/java/org/sadtech/consultant/database/entity/SaveUnit.java index 8e7a447..b5df08e 100644 --- a/src/main/java/org/sadtech/consultant/entity/SaveUnit.java +++ b/src/main/java/org/sadtech/consultant/database/entity/SaveUnit.java @@ -1,4 +1,4 @@ -package org.sadtech.consultant.entity; +package org.sadtech.consultant.database.entity; import lombok.Data; diff --git a/src/main/java/org/sadtech/consultant/entity/SocialNetworks.java b/src/main/java/org/sadtech/consultant/database/entity/SocialNetworks.java similarity index 81% rename from src/main/java/org/sadtech/consultant/entity/SocialNetworks.java rename to src/main/java/org/sadtech/consultant/database/entity/SocialNetworks.java index d167608..d3c78a4 100644 --- a/src/main/java/org/sadtech/consultant/entity/SocialNetworks.java +++ b/src/main/java/org/sadtech/consultant/database/entity/SocialNetworks.java @@ -1,4 +1,4 @@ -package org.sadtech.consultant.entity; +package org.sadtech.consultant.database.entity; import lombok.Data; diff --git a/src/main/java/org/sadtech/consultant/entity/Unit.java b/src/main/java/org/sadtech/consultant/database/entity/Unit.java similarity index 81% rename from src/main/java/org/sadtech/consultant/entity/Unit.java rename to src/main/java/org/sadtech/consultant/database/entity/Unit.java index 0f13505..a267686 100644 --- a/src/main/java/org/sadtech/consultant/entity/Unit.java +++ b/src/main/java/org/sadtech/consultant/database/entity/Unit.java @@ -1,4 +1,4 @@ -package org.sadtech.consultant.entity; +package org.sadtech.consultant.database.entity; import lombok.Data; diff --git a/src/main/java/org/sadtech/consultant/entity/User.java b/src/main/java/org/sadtech/consultant/database/entity/User.java similarity index 68% rename from src/main/java/org/sadtech/consultant/entity/User.java rename to src/main/java/org/sadtech/consultant/database/entity/User.java index c58617b..10271c7 100644 --- a/src/main/java/org/sadtech/consultant/entity/User.java +++ b/src/main/java/org/sadtech/consultant/database/entity/User.java @@ -1,9 +1,8 @@ -package org.sadtech.consultant.entity; +package org.sadtech.consultant.database.entity; import lombok.Data; import javax.persistence.Entity; -import javax.persistence.GeneratedValue; import javax.persistence.Id; import java.util.List; @@ -17,7 +16,7 @@ public class User { private String token; private String lastName; private String city; - private List socialNetworks; +// private List socialNetworks; } diff --git a/src/main/java/org/sadtech/consultant/repository/MessageRepository.java b/src/main/java/org/sadtech/consultant/database/repository/MessageRepository.java similarity index 56% rename from src/main/java/org/sadtech/consultant/repository/MessageRepository.java rename to src/main/java/org/sadtech/consultant/database/repository/MessageRepository.java index aa0ec3b..51d73ed 100644 --- a/src/main/java/org/sadtech/consultant/repository/MessageRepository.java +++ b/src/main/java/org/sadtech/consultant/database/repository/MessageRepository.java @@ -1,6 +1,6 @@ -package org.sadtech.consultant.repository; +package org.sadtech.consultant.database.repository; -import org.sadtech.consultant.entity.Message; +import org.sadtech.consultant.database.entity.Message; import org.springframework.data.jpa.repository.JpaRepository; public interface MessageRepository extends JpaRepository { diff --git a/src/main/java/org/sadtech/consultant/repository/NextUnitRepositoriy.java b/src/main/java/org/sadtech/consultant/database/repository/NextUnitRepositoriy.java similarity index 57% rename from src/main/java/org/sadtech/consultant/repository/NextUnitRepositoriy.java rename to src/main/java/org/sadtech/consultant/database/repository/NextUnitRepositoriy.java index 6cc97d5..eff732b 100644 --- a/src/main/java/org/sadtech/consultant/repository/NextUnitRepositoriy.java +++ b/src/main/java/org/sadtech/consultant/database/repository/NextUnitRepositoriy.java @@ -1,6 +1,6 @@ -package org.sadtech.consultant.repository; +package org.sadtech.consultant.database.repository; -import org.sadtech.consultant.entity.NextUnit; +import org.sadtech.consultant.database.entity.NextUnit; import org.springframework.data.jpa.repository.JpaRepository; public interface NextUnitRepositoriy extends JpaRepository { diff --git a/src/main/java/org/sadtech/consultant/repository/SaveUnitRepositoriy.java b/src/main/java/org/sadtech/consultant/database/repository/SaveUnitRepositoriy.java similarity index 56% rename from src/main/java/org/sadtech/consultant/repository/SaveUnitRepositoriy.java rename to src/main/java/org/sadtech/consultant/database/repository/SaveUnitRepositoriy.java index d1cd49a..7ff8077 100644 --- a/src/main/java/org/sadtech/consultant/repository/SaveUnitRepositoriy.java +++ b/src/main/java/org/sadtech/consultant/database/repository/SaveUnitRepositoriy.java @@ -1,6 +1,6 @@ -package org.sadtech.consultant.repository; +package org.sadtech.consultant.database.repository; -import org.sadtech.consultant.entity.SaveUnit; +import org.sadtech.consultant.database.entity.SaveUnit; import org.springframework.data.jpa.repository.JpaRepository; public interface SaveUnitRepositoriy extends JpaRepository { diff --git a/src/main/java/org/sadtech/consultant/repository/SocialNetworksRepositoriy.java b/src/main/java/org/sadtech/consultant/database/repository/SocialNetworksRepositoriy.java similarity index 57% rename from src/main/java/org/sadtech/consultant/repository/SocialNetworksRepositoriy.java rename to src/main/java/org/sadtech/consultant/database/repository/SocialNetworksRepositoriy.java index 1e9e84a..7c606ae 100644 --- a/src/main/java/org/sadtech/consultant/repository/SocialNetworksRepositoriy.java +++ b/src/main/java/org/sadtech/consultant/database/repository/SocialNetworksRepositoriy.java @@ -1,6 +1,6 @@ -package org.sadtech.consultant.repository; +package org.sadtech.consultant.database.repository; -import org.sadtech.consultant.entity.SocialNetworks; +import org.sadtech.consultant.database.entity.SocialNetworks; import org.springframework.data.jpa.repository.JpaRepository; public interface SocialNetworksRepositoriy extends JpaRepository { diff --git a/src/main/java/org/sadtech/consultant/repository/UnitRepositoriy.java b/src/main/java/org/sadtech/consultant/database/repository/UnitRepositoriy.java similarity index 56% rename from src/main/java/org/sadtech/consultant/repository/UnitRepositoriy.java rename to src/main/java/org/sadtech/consultant/database/repository/UnitRepositoriy.java index f804f65..51e7cca 100644 --- a/src/main/java/org/sadtech/consultant/repository/UnitRepositoriy.java +++ b/src/main/java/org/sadtech/consultant/database/repository/UnitRepositoriy.java @@ -1,6 +1,6 @@ -package org.sadtech.consultant.repository; +package org.sadtech.consultant.database.repository; -import org.sadtech.consultant.entity.Unit; +import org.sadtech.consultant.database.entity.Unit; import org.springframework.data.jpa.repository.JpaRepository; public interface UnitRepositoriy extends JpaRepository { diff --git a/src/main/java/org/sadtech/consultant/repository/UserRepositoriy.java b/src/main/java/org/sadtech/consultant/database/repository/UserRepositoriy.java similarity index 56% rename from src/main/java/org/sadtech/consultant/repository/UserRepositoriy.java rename to src/main/java/org/sadtech/consultant/database/repository/UserRepositoriy.java index 25e5e05..f92f0d1 100644 --- a/src/main/java/org/sadtech/consultant/repository/UserRepositoriy.java +++ b/src/main/java/org/sadtech/consultant/database/repository/UserRepositoriy.java @@ -1,6 +1,6 @@ -package org.sadtech.consultant.repository; +package org.sadtech.consultant.database.repository; -import org.sadtech.consultant.entity.User; +import org.sadtech.consultant.database.entity.User; import org.springframework.data.jpa.repository.JpaRepository; public interface UserRepositoriy extends JpaRepository { diff --git a/src/main/java/org/sadtech/consultant/database/service/MessageService.java b/src/main/java/org/sadtech/consultant/database/service/MessageService.java new file mode 100644 index 0000000..c4edb28 --- /dev/null +++ b/src/main/java/org/sadtech/consultant/database/service/MessageService.java @@ -0,0 +1,8 @@ +package org.sadtech.consultant.database.service; + +import org.sadtech.consultant.database.entity.Message; + +public interface MessageService { + + void addMessage(Message message); +} diff --git a/src/main/java/org/sadtech/consultant/database/service/NextUnitService.java b/src/main/java/org/sadtech/consultant/database/service/NextUnitService.java new file mode 100644 index 0000000..0106520 --- /dev/null +++ b/src/main/java/org/sadtech/consultant/database/service/NextUnitService.java @@ -0,0 +1,4 @@ +package org.sadtech.consultant.database.service; + +public interface NextUnitService { +} diff --git a/src/main/java/org/sadtech/consultant/database/service/SaveUnitService.java b/src/main/java/org/sadtech/consultant/database/service/SaveUnitService.java new file mode 100644 index 0000000..74250ae --- /dev/null +++ b/src/main/java/org/sadtech/consultant/database/service/SaveUnitService.java @@ -0,0 +1,4 @@ +package org.sadtech.consultant.database.service; + +public interface SaveUnitService { +} diff --git a/src/main/java/org/sadtech/consultant/database/service/SocialNetworksService.java b/src/main/java/org/sadtech/consultant/database/service/SocialNetworksService.java new file mode 100644 index 0000000..83d12da --- /dev/null +++ b/src/main/java/org/sadtech/consultant/database/service/SocialNetworksService.java @@ -0,0 +1,4 @@ +package org.sadtech.consultant.database.service; + +public interface SocialNetworksService { +} diff --git a/src/main/java/org/sadtech/consultant/database/service/UnitService.java b/src/main/java/org/sadtech/consultant/database/service/UnitService.java new file mode 100644 index 0000000..9de39e8 --- /dev/null +++ b/src/main/java/org/sadtech/consultant/database/service/UnitService.java @@ -0,0 +1,10 @@ +package org.sadtech.consultant.database.service; + +import org.sadtech.consultant.database.entity.Unit; + +public interface UnitService { + + void addUnit(Unit unit); + void removeUnit(Long id); + +} diff --git a/src/main/java/org/sadtech/consultant/database/service/UserService.java b/src/main/java/org/sadtech/consultant/database/service/UserService.java new file mode 100644 index 0000000..3e81573 --- /dev/null +++ b/src/main/java/org/sadtech/consultant/database/service/UserService.java @@ -0,0 +1,10 @@ +package org.sadtech.consultant.database.service; + +import org.sadtech.consultant.database.entity.User; + +public interface UserService { + + void addUser(User user); + void removeUser(Long id); + +} diff --git a/src/main/java/org/sadtech/consultant/database/service/impl/MessageServiceImpl.java b/src/main/java/org/sadtech/consultant/database/service/impl/MessageServiceImpl.java new file mode 100644 index 0000000..2171cda --- /dev/null +++ b/src/main/java/org/sadtech/consultant/database/service/impl/MessageServiceImpl.java @@ -0,0 +1,18 @@ +package org.sadtech.consultant.database.service.impl; + +import org.sadtech.consultant.database.entity.Message; +import org.sadtech.consultant.database.repository.MessageRepository; +import org.sadtech.consultant.database.service.MessageService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class MessageServiceImpl implements MessageService { + + @Autowired + private MessageRepository repository; + + public void addMessage(Message message) { + repository.saveAndFlush(message); + } +} diff --git a/src/main/java/org/sadtech/consultant/service/impl/NextUnitServiceImpl.java b/src/main/java/org/sadtech/consultant/database/service/impl/NextUnitServiceImpl.java similarity index 56% rename from src/main/java/org/sadtech/consultant/service/impl/NextUnitServiceImpl.java rename to src/main/java/org/sadtech/consultant/database/service/impl/NextUnitServiceImpl.java index d06b195..282c162 100644 --- a/src/main/java/org/sadtech/consultant/service/impl/NextUnitServiceImpl.java +++ b/src/main/java/org/sadtech/consultant/database/service/impl/NextUnitServiceImpl.java @@ -1,7 +1,7 @@ -package org.sadtech.consultant.service.impl; +package org.sadtech.consultant.database.service.impl; -import org.sadtech.consultant.repository.NextUnitRepositoriy; -import org.sadtech.consultant.service.NextUnitService; +import org.sadtech.consultant.database.repository.NextUnitRepositoriy; +import org.sadtech.consultant.database.service.NextUnitService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/main/java/org/sadtech/consultant/service/impl/SaveUnitServiceImpl.java b/src/main/java/org/sadtech/consultant/database/service/impl/SaveUnitServiceImpl.java similarity index 56% rename from src/main/java/org/sadtech/consultant/service/impl/SaveUnitServiceImpl.java rename to src/main/java/org/sadtech/consultant/database/service/impl/SaveUnitServiceImpl.java index 51ef4b6..2524815 100644 --- a/src/main/java/org/sadtech/consultant/service/impl/SaveUnitServiceImpl.java +++ b/src/main/java/org/sadtech/consultant/database/service/impl/SaveUnitServiceImpl.java @@ -1,7 +1,7 @@ -package org.sadtech.consultant.service.impl; +package org.sadtech.consultant.database.service.impl; -import org.sadtech.consultant.repository.SaveUnitRepositoriy; -import org.sadtech.consultant.service.SaveUnitService; +import org.sadtech.consultant.database.repository.SaveUnitRepositoriy; +import org.sadtech.consultant.database.service.SaveUnitService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/main/java/org/sadtech/consultant/service/impl/SocialNetworksServiceImpl.java b/src/main/java/org/sadtech/consultant/database/service/impl/SocialNetworksServiceImpl.java similarity index 56% rename from src/main/java/org/sadtech/consultant/service/impl/SocialNetworksServiceImpl.java rename to src/main/java/org/sadtech/consultant/database/service/impl/SocialNetworksServiceImpl.java index 06d5f78..b1b8c05 100644 --- a/src/main/java/org/sadtech/consultant/service/impl/SocialNetworksServiceImpl.java +++ b/src/main/java/org/sadtech/consultant/database/service/impl/SocialNetworksServiceImpl.java @@ -1,7 +1,7 @@ -package org.sadtech.consultant.service.impl; +package org.sadtech.consultant.database.service.impl; -import org.sadtech.consultant.repository.SocialNetworksRepositoriy; -import org.sadtech.consultant.service.SocialNetworksService; +import org.sadtech.consultant.database.repository.SocialNetworksRepositoriy; +import org.sadtech.consultant.database.service.SocialNetworksService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/main/java/org/sadtech/consultant/service/impl/UnitServiceImpl.java b/src/main/java/org/sadtech/consultant/database/service/impl/UnitServiceImpl.java similarity index 60% rename from src/main/java/org/sadtech/consultant/service/impl/UnitServiceImpl.java rename to src/main/java/org/sadtech/consultant/database/service/impl/UnitServiceImpl.java index 14706d9..1a67158 100644 --- a/src/main/java/org/sadtech/consultant/service/impl/UnitServiceImpl.java +++ b/src/main/java/org/sadtech/consultant/database/service/impl/UnitServiceImpl.java @@ -1,8 +1,8 @@ -package org.sadtech.consultant.service.impl; +package org.sadtech.consultant.database.service.impl; -import org.sadtech.consultant.entity.Unit; -import org.sadtech.consultant.repository.UnitRepositoriy; -import org.sadtech.consultant.service.UnitService; +import org.sadtech.consultant.database.entity.Unit; +import org.sadtech.consultant.database.repository.UnitRepositoriy; +import org.sadtech.consultant.database.service.UnitService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/main/java/org/sadtech/consultant/service/impl/UserServiceImpl.java b/src/main/java/org/sadtech/consultant/database/service/impl/UserServiceImpl.java similarity index 67% rename from src/main/java/org/sadtech/consultant/service/impl/UserServiceImpl.java rename to src/main/java/org/sadtech/consultant/database/service/impl/UserServiceImpl.java index 3535b00..fe6c606 100644 --- a/src/main/java/org/sadtech/consultant/service/impl/UserServiceImpl.java +++ b/src/main/java/org/sadtech/consultant/database/service/impl/UserServiceImpl.java @@ -1,8 +1,8 @@ -package org.sadtech.consultant.service.impl; +package org.sadtech.consultant.database.service.impl; -import org.sadtech.consultant.entity.User; -import org.sadtech.consultant.repository.UserRepositoriy; -import org.sadtech.consultant.service.UserService; +import org.sadtech.consultant.database.entity.User; +import org.sadtech.consultant.database.repository.UserRepositoriy; +import org.sadtech.consultant.database.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/main/java/org/sadtech/consultant/service/MessageService.java b/src/main/java/org/sadtech/consultant/service/MessageService.java deleted file mode 100644 index b40658e..0000000 --- a/src/main/java/org/sadtech/consultant/service/MessageService.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.sadtech.consultant.service; - -import org.sadtech.consultant.entity.Message; - -public interface MessageService { - - void addMessage(Message message); -} diff --git a/src/main/java/org/sadtech/consultant/service/NextUnitService.java b/src/main/java/org/sadtech/consultant/service/NextUnitService.java deleted file mode 100644 index 9ff5ac8..0000000 --- a/src/main/java/org/sadtech/consultant/service/NextUnitService.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.sadtech.consultant.service; - -public interface NextUnitService { -} diff --git a/src/main/java/org/sadtech/consultant/service/SaveUnitService.java b/src/main/java/org/sadtech/consultant/service/SaveUnitService.java deleted file mode 100644 index 39e76cc..0000000 --- a/src/main/java/org/sadtech/consultant/service/SaveUnitService.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.sadtech.consultant.service; - -public interface SaveUnitService { -} diff --git a/src/main/java/org/sadtech/consultant/service/SocialNetworksService.java b/src/main/java/org/sadtech/consultant/service/SocialNetworksService.java deleted file mode 100644 index 54dab6d..0000000 --- a/src/main/java/org/sadtech/consultant/service/SocialNetworksService.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.sadtech.consultant.service; - -public interface SocialNetworksService { -} diff --git a/src/main/java/org/sadtech/consultant/service/UnitService.java b/src/main/java/org/sadtech/consultant/service/UnitService.java deleted file mode 100644 index c8e77e9..0000000 --- a/src/main/java/org/sadtech/consultant/service/UnitService.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.sadtech.consultant.service; - -import org.sadtech.consultant.entity.Unit; - -public interface UnitService { - - void addUnit(Unit unit); - void removeUnit(Long id); - -} diff --git a/src/main/java/org/sadtech/consultant/service/UserService.java b/src/main/java/org/sadtech/consultant/service/UserService.java deleted file mode 100644 index 5018e68..0000000 --- a/src/main/java/org/sadtech/consultant/service/UserService.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.sadtech.consultant.service; - -import org.sadtech.consultant.entity.User; - -public interface UserService { - - void addUser(User user); - void removeUser(Long id); - -} diff --git a/src/main/java/org/sadtech/consultant/service/impl/MessageServiceImpl.java b/src/main/java/org/sadtech/consultant/service/impl/MessageServiceImpl.java deleted file mode 100644 index e752d1e..0000000 --- a/src/main/java/org/sadtech/consultant/service/impl/MessageServiceImpl.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.sadtech.consultant.service.impl; - -import org.sadtech.consultant.entity.Message; -import org.sadtech.consultant.repository.MessageRepository; -import org.sadtech.consultant.service.MessageService; -import org.springframework.beans.factory.annotation.Autowired; - -public class MessageServiceImpl implements MessageService { - - @Autowired - private MessageRepository repository; - - public void addMessage(Message message) { - repository.saveAndFlush(message); - } -}