Refactoring: Code Style and Optimize import
This commit is contained in:
parent
d42ae014e0
commit
92c2c4fd7b
@ -3,7 +3,8 @@ package org.sadtech.consultant.database.entity;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
@ -29,7 +30,4 @@ public class Person {
|
||||
@MapKeyColumn(name = "KeysSocialNetworks", length = 20)
|
||||
private Map<String, Integer> socialNetworks = new HashMap<>();
|
||||
|
||||
// @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL, mappedBy="idMess")
|
||||
// private List<Message> messages;
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import lombok.Data;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
|
@ -4,7 +4,6 @@ import lombok.Data;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
|
@ -7,8 +7,12 @@ import java.util.Map;
|
||||
public interface PersonService {
|
||||
|
||||
void addUser(Person user);
|
||||
|
||||
void removeUser(Long id);
|
||||
|
||||
Person getUserByID(Long id);
|
||||
|
||||
Map<String, Integer> getSocialNetwork(Long id);
|
||||
|
||||
Person getUserBySocialNetworksId(String type, Integer socialNetworksId);
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import org.sadtech.consultant.database.entity.Unit;
|
||||
public interface UnitService {
|
||||
|
||||
void addUnit(Unit unit);
|
||||
|
||||
void removeUnit(Long id);
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ 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;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package org.sadtech.consultant.processing;
|
||||
|
||||
import org.sadtech.consultant.database.entity.Message;
|
||||
import org.sadtech.consultant.database.entity.Person;
|
||||
import org.sadtech.consultant.database.service.MessageService;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user