fix code
This commit is contained in:
parent
06864c7ec8
commit
112958a70b
@ -3,7 +3,15 @@ package ru.ulstu.user.controller;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.security.access.annotation.Secured;
|
import org.springframework.security.access.annotation.Secured;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PutMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import ru.ulstu.configuration.Constants;
|
import ru.ulstu.configuration.Constants;
|
||||||
import ru.ulstu.core.model.response.PageableItems;
|
import ru.ulstu.core.model.response.PageableItems;
|
||||||
import ru.ulstu.core.model.response.Response;
|
import ru.ulstu.core.model.response.Response;
|
||||||
@ -11,10 +19,14 @@ import ru.ulstu.odin.controller.OdinController;
|
|||||||
import ru.ulstu.odin.model.OdinMetadata;
|
import ru.ulstu.odin.model.OdinMetadata;
|
||||||
import ru.ulstu.odin.model.OdinVoid;
|
import ru.ulstu.odin.model.OdinVoid;
|
||||||
import ru.ulstu.odin.service.OdinService;
|
import ru.ulstu.odin.service.OdinService;
|
||||||
import ru.ulstu.user.model.*;
|
import ru.ulstu.user.model.UserDto;
|
||||||
|
import ru.ulstu.user.model.UserListDto;
|
||||||
|
import ru.ulstu.user.model.UserResetPasswordDto;
|
||||||
|
import ru.ulstu.user.model.UserRoleConstants;
|
||||||
|
import ru.ulstu.user.model.UserRoleDto;
|
||||||
|
import ru.ulstu.user.model.UserSessionListDto;
|
||||||
import ru.ulstu.user.service.UserService;
|
import ru.ulstu.user.service.UserService;
|
||||||
import ru.ulstu.user.service.UserSessionService;
|
import ru.ulstu.user.service.UserSessionService;
|
||||||
import ru.ulstu.user.model.*;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
@ -5,7 +5,14 @@ import org.hibernate.validator.constraints.Email;
|
|||||||
import ru.ulstu.configuration.Constants;
|
import ru.ulstu.configuration.Constants;
|
||||||
import ru.ulstu.core.model.BaseEntity;
|
import ru.ulstu.core.model.BaseEntity;
|
||||||
|
|
||||||
import javax.persistence.*;
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.JoinTable;
|
||||||
|
import javax.persistence.ManyToMany;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Pattern;
|
import javax.validation.constraints.Pattern;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
|
@ -1,11 +1,18 @@
|
|||||||
package ru.ulstu.user.service;
|
package ru.ulstu.user.service;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import ru.ulstu.user.model.*;
|
import ru.ulstu.user.model.User;
|
||||||
import ru.ulstu.user.model.*;
|
import ru.ulstu.user.model.UserDto;
|
||||||
|
import ru.ulstu.user.model.UserListDto;
|
||||||
|
import ru.ulstu.user.model.UserRole;
|
||||||
|
import ru.ulstu.user.model.UserRoleDto;
|
||||||
import ru.ulstu.user.repository.UserRoleRepository;
|
import ru.ulstu.user.repository.UserRoleRepository;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@ -16,13 +16,33 @@ import ru.ulstu.core.error.EntityIdIsNullException;
|
|||||||
import ru.ulstu.core.jpa.OffsetablePageRequest;
|
import ru.ulstu.core.jpa.OffsetablePageRequest;
|
||||||
import ru.ulstu.core.model.BaseEntity;
|
import ru.ulstu.core.model.BaseEntity;
|
||||||
import ru.ulstu.core.model.response.PageableItems;
|
import ru.ulstu.core.model.response.PageableItems;
|
||||||
import ru.ulstu.user.error.*;
|
import ru.ulstu.user.error.UserActivationError;
|
||||||
import ru.ulstu.user.model.*;
|
import ru.ulstu.user.error.UserEmailExistsException;
|
||||||
|
import ru.ulstu.user.error.UserIdExistsException;
|
||||||
|
import ru.ulstu.user.error.UserIsUndeadException;
|
||||||
|
import ru.ulstu.user.error.UserLoginExistsException;
|
||||||
|
import ru.ulstu.user.error.UserNotActivatedException;
|
||||||
|
import ru.ulstu.user.error.UserNotFoundException;
|
||||||
|
import ru.ulstu.user.error.UserPasswordsNotValidOrNotMatchException;
|
||||||
|
import ru.ulstu.user.error.UserResetKeyError;
|
||||||
|
import ru.ulstu.user.model.User;
|
||||||
|
import ru.ulstu.user.model.UserDto;
|
||||||
|
import ru.ulstu.user.model.UserListDto;
|
||||||
|
import ru.ulstu.user.model.UserResetPasswordDto;
|
||||||
|
import ru.ulstu.user.model.UserRole;
|
||||||
|
import ru.ulstu.user.model.UserRoleConstants;
|
||||||
|
import ru.ulstu.user.model.UserRoleDto;
|
||||||
import ru.ulstu.user.repository.UserRepository;
|
import ru.ulstu.user.repository.UserRepository;
|
||||||
import ru.ulstu.user.repository.UserRoleRepository;
|
import ru.ulstu.user.repository.UserRoleRepository;
|
||||||
import ru.ulstu.user.util.UserUtils;
|
import ru.ulstu.user.util.UserUtils;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@ -6,8 +6,8 @@ import org.springframework.data.domain.Page;
|
|||||||
import org.springframework.data.domain.Sort;
|
import org.springframework.data.domain.Sort;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import ru.ulstu.core.model.response.PageableItems;
|
|
||||||
import ru.ulstu.core.jpa.OffsetablePageRequest;
|
import ru.ulstu.core.jpa.OffsetablePageRequest;
|
||||||
|
import ru.ulstu.core.model.response.PageableItems;
|
||||||
import ru.ulstu.user.error.UserNotFoundException;
|
import ru.ulstu.user.error.UserNotFoundException;
|
||||||
import ru.ulstu.user.model.User;
|
import ru.ulstu.user.model.User;
|
||||||
import ru.ulstu.user.model.UserSession;
|
import ru.ulstu.user.model.UserSession;
|
||||||
|
Loading…
Reference in New Issue
Block a user