diff --git a/src/main/java/tech/crm/crmserver/CrmServerApplication.java b/src/main/java/tech/crm/crmserver/CrmServerApplication.java index 93e7ebb..6c718b4 100644 --- a/src/main/java/tech/crm/crmserver/CrmServerApplication.java +++ b/src/main/java/tech/crm/crmserver/CrmServerApplication.java @@ -1,6 +1,5 @@ package tech.crm.crmserver; -import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; diff --git a/src/main/java/tech/crm/crmserver/common/enums/BelongToStatus.java b/src/main/java/tech/crm/crmserver/common/enums/BelongToStatus.java index 0ef334e..548eefb 100644 --- a/src/main/java/tech/crm/crmserver/common/enums/BelongToStatus.java +++ b/src/main/java/tech/crm/crmserver/common/enums/BelongToStatus.java @@ -1,8 +1,7 @@ package tech.crm.crmserver.common.enums; + import lombok.AllArgsConstructor; -import lombok.Data; import lombok.NoArgsConstructor; -import lombok.NonNull; /** * Status Enum for Belong To diff --git a/src/main/java/tech/crm/crmserver/common/response/Result.java b/src/main/java/tech/crm/crmserver/common/response/Result.java index 746f344..c41116b 100644 --- a/src/main/java/tech/crm/crmserver/common/response/Result.java +++ b/src/main/java/tech/crm/crmserver/common/response/Result.java @@ -4,7 +4,6 @@ import lombok.Data; import lombok.NoArgsConstructor; import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; /** *

diff --git a/src/main/java/tech/crm/crmserver/config/WebMvcConfig.java b/src/main/java/tech/crm/crmserver/config/WebMvcConfig.java index 1a8bfae..54904db 100644 --- a/src/main/java/tech/crm/crmserver/config/WebMvcConfig.java +++ b/src/main/java/tech/crm/crmserver/config/WebMvcConfig.java @@ -1,21 +1,11 @@ package tech.crm.crmserver.config; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.databind.DeserializationFeature; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.PropertyNamingStrategy; import org.springframework.context.annotation.Configuration; -import org.springframework.http.converter.HttpMessageConverter; -import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; -import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import tech.crm.crmserver.common.constants.SecurityConstants; -import java.util.List; -import java.util.TimeZone; - /** * WebMvc configuration * @author Lingxiao diff --git a/src/main/java/tech/crm/crmserver/controller/BelongToController.java b/src/main/java/tech/crm/crmserver/controller/BelongToController.java index 827ffd5..f238466 100644 --- a/src/main/java/tech/crm/crmserver/controller/BelongToController.java +++ b/src/main/java/tech/crm/crmserver/controller/BelongToController.java @@ -1,20 +1,8 @@ package tech.crm.crmserver.controller; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import tech.crm.crmserver.common.response.ResponseResult; -import tech.crm.crmserver.dao.BelongTo; -import tech.crm.crmserver.dao.Organization; -import tech.crm.crmserver.service.BelongToService; -import tech.crm.crmserver.service.OrganizationService; -import tech.crm.crmserver.service.UserService; /** *

diff --git a/src/main/java/tech/crm/crmserver/controller/ContactController.java b/src/main/java/tech/crm/crmserver/controller/ContactController.java index 48705de..00a55f4 100644 --- a/src/main/java/tech/crm/crmserver/controller/ContactController.java +++ b/src/main/java/tech/crm/crmserver/controller/ContactController.java @@ -1,16 +1,11 @@ package tech.crm.crmserver.controller; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; - import tech.crm.crmserver.common.enums.PermissionLevel; import tech.crm.crmserver.common.response.ResponseResult; -import tech.crm.crmserver.common.utils.NullAwareBeanUtilsBean; import tech.crm.crmserver.dao.Contact; import tech.crm.crmserver.dao.Department; import tech.crm.crmserver.dao.Permission; @@ -24,10 +19,7 @@ import tech.crm.crmserver.service.UserService; import javax.validation.Valid; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; /** *

diff --git a/src/main/java/tech/crm/crmserver/controller/DepartmentController.java b/src/main/java/tech/crm/crmserver/controller/DepartmentController.java index 9eb5af2..3e2c818 100644 --- a/src/main/java/tech/crm/crmserver/controller/DepartmentController.java +++ b/src/main/java/tech/crm/crmserver/controller/DepartmentController.java @@ -5,7 +5,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; - import tech.crm.crmserver.common.enums.PermissionLevel; import tech.crm.crmserver.common.response.ResponseResult; import tech.crm.crmserver.dao.Permission; diff --git a/src/main/java/tech/crm/crmserver/controller/EventController.java b/src/main/java/tech/crm/crmserver/controller/EventController.java index 99a5c55..d8e213d 100644 --- a/src/main/java/tech/crm/crmserver/controller/EventController.java +++ b/src/main/java/tech/crm/crmserver/controller/EventController.java @@ -2,7 +2,6 @@ import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; /** diff --git a/src/main/java/tech/crm/crmserver/controller/OrganizationController.java b/src/main/java/tech/crm/crmserver/controller/OrganizationController.java index 2b81b87..494d0d5 100644 --- a/src/main/java/tech/crm/crmserver/controller/OrganizationController.java +++ b/src/main/java/tech/crm/crmserver/controller/OrganizationController.java @@ -3,18 +3,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; - -import tech.crm.crmserver.common.enums.PermissionLevel; import tech.crm.crmserver.common.enums.Status; import tech.crm.crmserver.common.response.ResponseResult; import tech.crm.crmserver.common.utils.NullAwareBeanUtilsBean; -import tech.crm.crmserver.dao.*; +import tech.crm.crmserver.dao.BelongTo; +import tech.crm.crmserver.dao.Department; +import tech.crm.crmserver.dao.Organization; +import tech.crm.crmserver.dao.Permission; import tech.crm.crmserver.dto.DepartmentDTO; import tech.crm.crmserver.dto.OrganizationDTO; import tech.crm.crmserver.exception.*; @@ -23,11 +19,6 @@ import java.util.ArrayList; import java.util.Comparator; import java.util.List; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import tech.crm.crmserver.dao.Organization; -import tech.crm.crmserver.service.OrganizationService; -import tech.crm.crmserver.service.UserService; /** *

diff --git a/src/main/java/tech/crm/crmserver/controller/PermissionController.java b/src/main/java/tech/crm/crmserver/controller/PermissionController.java index de2c90f..064f246 100644 --- a/src/main/java/tech/crm/crmserver/controller/PermissionController.java +++ b/src/main/java/tech/crm/crmserver/controller/PermissionController.java @@ -1,16 +1,11 @@ package tech.crm.crmserver.controller; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; -import org.springframework.http.HttpStatus; - -import tech.crm.crmserver.common.enums.PermissionLevel; import tech.crm.crmserver.common.response.ResponseResult; import tech.crm.crmserver.dao.Organization; import tech.crm.crmserver.dao.Permission; -import tech.crm.crmserver.exception.NotEnoughPermissionException; import tech.crm.crmserver.exception.UserNotInDepartmentException; import tech.crm.crmserver.service.OrganizationService; import tech.crm.crmserver.service.PermissionService; diff --git a/src/main/java/tech/crm/crmserver/controller/ToDoListController.java b/src/main/java/tech/crm/crmserver/controller/ToDoListController.java index 465194f..b7d4bc5 100644 --- a/src/main/java/tech/crm/crmserver/controller/ToDoListController.java +++ b/src/main/java/tech/crm/crmserver/controller/ToDoListController.java @@ -2,7 +2,6 @@ import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; /** diff --git a/src/main/java/tech/crm/crmserver/controller/TokenKeyController.java b/src/main/java/tech/crm/crmserver/controller/TokenKeyController.java index 3861b05..4fb0009 100644 --- a/src/main/java/tech/crm/crmserver/controller/TokenKeyController.java +++ b/src/main/java/tech/crm/crmserver/controller/TokenKeyController.java @@ -2,7 +2,6 @@ import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; /** diff --git a/src/main/java/tech/crm/crmserver/controller/UserController.java b/src/main/java/tech/crm/crmserver/controller/UserController.java index 64c5c03..459a652 100644 --- a/src/main/java/tech/crm/crmserver/controller/UserController.java +++ b/src/main/java/tech/crm/crmserver/controller/UserController.java @@ -11,14 +11,9 @@ import tech.crm.crmserver.dto.LoginRequest; import tech.crm.crmserver.dto.ResetPasswordDTO; import tech.crm.crmserver.dto.UserDTO; -import tech.crm.crmserver.exception.LoginBadCredentialsException; -import tech.crm.crmserver.exception.UserAlreadyExistException; -import tech.crm.crmserver.service.MailService; import tech.crm.crmserver.service.TokenKeyService; import tech.crm.crmserver.service.UserService; -import javax.validation.constraints.Email; - /** *

diff --git a/src/main/java/tech/crm/crmserver/dao/BelongTo.java b/src/main/java/tech/crm/crmserver/dao/BelongTo.java index ab02078..660c2c8 100644 --- a/src/main/java/tech/crm/crmserver/dao/BelongTo.java +++ b/src/main/java/tech/crm/crmserver/dao/BelongTo.java @@ -1,15 +1,16 @@ package tech.crm.crmserver.dao; -import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import tech.crm.crmserver.common.enums.Status; +import java.io.Serializable; + /** *

* entity diff --git a/src/main/java/tech/crm/crmserver/dao/Contact.java b/src/main/java/tech/crm/crmserver/dao/Contact.java index d2c07a2..6d6ed9f 100644 --- a/src/main/java/tech/crm/crmserver/dao/Contact.java +++ b/src/main/java/tech/crm/crmserver/dao/Contact.java @@ -1,18 +1,18 @@ package tech.crm.crmserver.dao; -import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; -import java.time.LocalDate; import com.baomidou.mybatisplus.annotation.TableId; -import java.io.Serializable; -import java.util.Objects; - +import com.baomidou.mybatisplus.annotation.TableName; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import tech.crm.crmserver.common.enums.Status; +import java.io.Serializable; +import java.time.LocalDate; +import java.util.Objects; + /** *

* entity diff --git a/src/main/java/tech/crm/crmserver/dao/Department.java b/src/main/java/tech/crm/crmserver/dao/Department.java index e455c42..1183663 100644 --- a/src/main/java/tech/crm/crmserver/dao/Department.java +++ b/src/main/java/tech/crm/crmserver/dao/Department.java @@ -1,15 +1,16 @@ package tech.crm.crmserver.dao; -import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import tech.crm.crmserver.common.enums.Status; +import java.io.Serializable; + /** *

* entity diff --git a/src/main/java/tech/crm/crmserver/dao/Event.java b/src/main/java/tech/crm/crmserver/dao/Event.java index 478bc63..e859b9d 100644 --- a/src/main/java/tech/crm/crmserver/dao/Event.java +++ b/src/main/java/tech/crm/crmserver/dao/Event.java @@ -1,16 +1,17 @@ package tech.crm.crmserver.dao; -import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import java.time.LocalDateTime; -import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import tech.crm.crmserver.common.enums.Status; +import java.io.Serializable; +import java.time.LocalDateTime; + /** *

* entity diff --git a/src/main/java/tech/crm/crmserver/dao/Organization.java b/src/main/java/tech/crm/crmserver/dao/Organization.java index 4f1e227..99f3950 100644 --- a/src/main/java/tech/crm/crmserver/dao/Organization.java +++ b/src/main/java/tech/crm/crmserver/dao/Organization.java @@ -1,15 +1,16 @@ package tech.crm.crmserver.dao; -import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import tech.crm.crmserver.common.enums.Status; +import java.io.Serializable; + /** *

* entity diff --git a/src/main/java/tech/crm/crmserver/dao/Permission.java b/src/main/java/tech/crm/crmserver/dao/Permission.java index 969aaf7..d0dc843 100644 --- a/src/main/java/tech/crm/crmserver/dao/Permission.java +++ b/src/main/java/tech/crm/crmserver/dao/Permission.java @@ -1,9 +1,8 @@ package tech.crm.crmserver.dao; -import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -11,6 +10,8 @@ import tech.crm.crmserver.common.enums.PermissionLevel; import tech.crm.crmserver.common.enums.Status; +import java.io.Serializable; + /** *

* entity diff --git a/src/main/java/tech/crm/crmserver/dao/ToDoList.java b/src/main/java/tech/crm/crmserver/dao/ToDoList.java index 5210099..d989e77 100644 --- a/src/main/java/tech/crm/crmserver/dao/ToDoList.java +++ b/src/main/java/tech/crm/crmserver/dao/ToDoList.java @@ -1,16 +1,17 @@ package tech.crm.crmserver.dao; -import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import java.time.LocalDateTime; -import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import tech.crm.crmserver.common.enums.Status; +import java.io.Serializable; +import java.time.LocalDateTime; + /** *

* entity diff --git a/src/main/java/tech/crm/crmserver/dao/TokenKey.java b/src/main/java/tech/crm/crmserver/dao/TokenKey.java index 7805be1..32a5f60 100644 --- a/src/main/java/tech/crm/crmserver/dao/TokenKey.java +++ b/src/main/java/tech/crm/crmserver/dao/TokenKey.java @@ -1,16 +1,16 @@ package tech.crm.crmserver.dao; -import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import java.io.Serializable; -import java.time.LocalDateTime; - +import com.baomidou.mybatisplus.annotation.TableName; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import java.io.Serializable; +import java.time.LocalDateTime; + /** *

* entity diff --git a/src/main/java/tech/crm/crmserver/dao/User.java b/src/main/java/tech/crm/crmserver/dao/User.java index 6aa08c9..9caa702 100644 --- a/src/main/java/tech/crm/crmserver/dao/User.java +++ b/src/main/java/tech/crm/crmserver/dao/User.java @@ -1,15 +1,16 @@ package tech.crm.crmserver.dao; -import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; -import java.io.Serializable; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import tech.crm.crmserver.common.enums.Status; +import java.io.Serializable; + /** *

* entity for data transfer with database diff --git a/src/main/java/tech/crm/crmserver/dto/ContactCreateDTO.java b/src/main/java/tech/crm/crmserver/dto/ContactCreateDTO.java index 265e2db..e7b7ed9 100644 --- a/src/main/java/tech/crm/crmserver/dto/ContactCreateDTO.java +++ b/src/main/java/tech/crm/crmserver/dto/ContactCreateDTO.java @@ -5,7 +5,6 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import tech.crm.crmserver.common.enums.Status; import javax.validation.constraints.Email; import javax.validation.constraints.NotNull; diff --git a/src/main/java/tech/crm/crmserver/dto/ContactUpdateDTO.java b/src/main/java/tech/crm/crmserver/dto/ContactUpdateDTO.java index ec4e6a0..346c597 100644 --- a/src/main/java/tech/crm/crmserver/dto/ContactUpdateDTO.java +++ b/src/main/java/tech/crm/crmserver/dto/ContactUpdateDTO.java @@ -1,11 +1,9 @@ package tech.crm.crmserver.dto; -import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import tech.crm.crmserver.common.enums.Status; import javax.validation.constraints.Email; import javax.validation.constraints.NotNull; diff --git a/src/main/java/tech/crm/crmserver/mapper/BelongToMapper.java b/src/main/java/tech/crm/crmserver/mapper/BelongToMapper.java index 7702380..9e8bfc1 100644 --- a/src/main/java/tech/crm/crmserver/mapper/BelongToMapper.java +++ b/src/main/java/tech/crm/crmserver/mapper/BelongToMapper.java @@ -1,8 +1,8 @@ package tech.crm.crmserver.mapper; -import tech.crm.crmserver.dao.BelongTo; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; +import tech.crm.crmserver.dao.BelongTo; /** *

diff --git a/src/main/java/tech/crm/crmserver/mapper/ContactMapper.java b/src/main/java/tech/crm/crmserver/mapper/ContactMapper.java index 48feab8..46eb06a 100644 --- a/src/main/java/tech/crm/crmserver/mapper/ContactMapper.java +++ b/src/main/java/tech/crm/crmserver/mapper/ContactMapper.java @@ -1,15 +1,14 @@ package tech.crm.crmserver.mapper; import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.toolkit.Constants; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; -import tech.crm.crmserver.dao.Contact; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; +import tech.crm.crmserver.dao.Contact; import tech.crm.crmserver.dto.ContactDTO; -import tech.crm.crmserver.dto.UserPermissionDTO; /** *

diff --git a/src/main/java/tech/crm/crmserver/mapper/DepartmentMapper.java b/src/main/java/tech/crm/crmserver/mapper/DepartmentMapper.java index 75f8dc0..bf89add 100644 --- a/src/main/java/tech/crm/crmserver/mapper/DepartmentMapper.java +++ b/src/main/java/tech/crm/crmserver/mapper/DepartmentMapper.java @@ -1,8 +1,8 @@ package tech.crm.crmserver.mapper; -import tech.crm.crmserver.dao.Department; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; +import tech.crm.crmserver.dao.Department; /** *

diff --git a/src/main/java/tech/crm/crmserver/mapper/EventMapper.java b/src/main/java/tech/crm/crmserver/mapper/EventMapper.java index 5d08f97..6566b0a 100644 --- a/src/main/java/tech/crm/crmserver/mapper/EventMapper.java +++ b/src/main/java/tech/crm/crmserver/mapper/EventMapper.java @@ -1,8 +1,8 @@ package tech.crm.crmserver.mapper; -import tech.crm.crmserver.dao.Event; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; +import tech.crm.crmserver.dao.Event; /** *

diff --git a/src/main/java/tech/crm/crmserver/mapper/OrganizationMapper.java b/src/main/java/tech/crm/crmserver/mapper/OrganizationMapper.java index d870a64..b97dc40 100644 --- a/src/main/java/tech/crm/crmserver/mapper/OrganizationMapper.java +++ b/src/main/java/tech/crm/crmserver/mapper/OrganizationMapper.java @@ -1,10 +1,10 @@ package tech.crm.crmserver.mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; -import tech.crm.crmserver.dao.Organization; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; +import tech.crm.crmserver.dao.Organization; import java.util.List; diff --git a/src/main/java/tech/crm/crmserver/mapper/PermissionMapper.java b/src/main/java/tech/crm/crmserver/mapper/PermissionMapper.java index b80c03f..8550afd 100644 --- a/src/main/java/tech/crm/crmserver/mapper/PermissionMapper.java +++ b/src/main/java/tech/crm/crmserver/mapper/PermissionMapper.java @@ -1,11 +1,11 @@ package tech.crm.crmserver.mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; -import tech.crm.crmserver.dao.Permission; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; +import tech.crm.crmserver.dao.Permission; import tech.crm.crmserver.dto.UserPermissionDTO; /** diff --git a/src/main/java/tech/crm/crmserver/mapper/ToDoListMapper.java b/src/main/java/tech/crm/crmserver/mapper/ToDoListMapper.java index 46e99c8..4f0a3f7 100644 --- a/src/main/java/tech/crm/crmserver/mapper/ToDoListMapper.java +++ b/src/main/java/tech/crm/crmserver/mapper/ToDoListMapper.java @@ -1,8 +1,8 @@ package tech.crm.crmserver.mapper; -import tech.crm.crmserver.dao.ToDoList; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; +import tech.crm.crmserver.dao.ToDoList; /** *

diff --git a/src/main/java/tech/crm/crmserver/mapper/TokenKeyMapper.java b/src/main/java/tech/crm/crmserver/mapper/TokenKeyMapper.java index e50b440..0358e4b 100644 --- a/src/main/java/tech/crm/crmserver/mapper/TokenKeyMapper.java +++ b/src/main/java/tech/crm/crmserver/mapper/TokenKeyMapper.java @@ -1,8 +1,8 @@ package tech.crm.crmserver.mapper; -import tech.crm.crmserver.dao.TokenKey; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; +import tech.crm.crmserver.dao.TokenKey; /** *

diff --git a/src/main/java/tech/crm/crmserver/mapper/UserMapper.java b/src/main/java/tech/crm/crmserver/mapper/UserMapper.java index df323a2..13f3705 100644 --- a/src/main/java/tech/crm/crmserver/mapper/UserMapper.java +++ b/src/main/java/tech/crm/crmserver/mapper/UserMapper.java @@ -1,8 +1,8 @@ package tech.crm.crmserver.mapper; -import tech.crm.crmserver.dao.User; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; +import tech.crm.crmserver.dao.User; /** *

diff --git a/src/main/java/tech/crm/crmserver/security/JwtAuthenticationEntryPoint.java b/src/main/java/tech/crm/crmserver/security/JwtAuthenticationEntryPoint.java index 11afbb1..e07461b 100644 --- a/src/main/java/tech/crm/crmserver/security/JwtAuthenticationEntryPoint.java +++ b/src/main/java/tech/crm/crmserver/security/JwtAuthenticationEntryPoint.java @@ -4,7 +4,6 @@ import org.springframework.http.HttpStatus; import org.springframework.security.core.AuthenticationException; import org.springframework.security.web.AuthenticationEntryPoint; -import tech.crm.crmserver.common.response.ResponseResult; import tech.crm.crmserver.common.response.Result; import javax.servlet.http.HttpServletRequest; diff --git a/src/main/java/tech/crm/crmserver/service/BelongToService.java b/src/main/java/tech/crm/crmserver/service/BelongToService.java index 37724b4..9fd1b63 100644 --- a/src/main/java/tech/crm/crmserver/service/BelongToService.java +++ b/src/main/java/tech/crm/crmserver/service/BelongToService.java @@ -1,8 +1,8 @@ package tech.crm.crmserver.service; +import com.baomidou.mybatisplus.extension.service.IService; import tech.crm.crmserver.common.enums.BelongToStatus; import tech.crm.crmserver.dao.BelongTo; -import com.baomidou.mybatisplus.extension.service.IService; import java.util.List; diff --git a/src/main/java/tech/crm/crmserver/service/ContactService.java b/src/main/java/tech/crm/crmserver/service/ContactService.java index b0b0991..51090d9 100644 --- a/src/main/java/tech/crm/crmserver/service/ContactService.java +++ b/src/main/java/tech/crm/crmserver/service/ContactService.java @@ -1,8 +1,8 @@ package tech.crm.crmserver.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import tech.crm.crmserver.dao.Contact; import com.baomidou.mybatisplus.extension.service.IService; +import tech.crm.crmserver.dao.Contact; import tech.crm.crmserver.dto.ContactCreateDTO; import tech.crm.crmserver.dto.ContactDTO; import tech.crm.crmserver.dto.ContactUpdateDTO; diff --git a/src/main/java/tech/crm/crmserver/service/DepartmentService.java b/src/main/java/tech/crm/crmserver/service/DepartmentService.java index 53467c7..abc82f3 100644 --- a/src/main/java/tech/crm/crmserver/service/DepartmentService.java +++ b/src/main/java/tech/crm/crmserver/service/DepartmentService.java @@ -1,8 +1,7 @@ package tech.crm.crmserver.service; -import org.springframework.web.bind.annotation.RequestParam; -import tech.crm.crmserver.dao.Department; import com.baomidou.mybatisplus.extension.service.IService; +import tech.crm.crmserver.dao.Department; import java.util.List; diff --git a/src/main/java/tech/crm/crmserver/service/EventService.java b/src/main/java/tech/crm/crmserver/service/EventService.java index 30111e2..6254c63 100644 --- a/src/main/java/tech/crm/crmserver/service/EventService.java +++ b/src/main/java/tech/crm/crmserver/service/EventService.java @@ -1,7 +1,7 @@ package tech.crm.crmserver.service; -import tech.crm.crmserver.dao.Event; import com.baomidou.mybatisplus.extension.service.IService; +import tech.crm.crmserver.dao.Event; /** *

diff --git a/src/main/java/tech/crm/crmserver/service/OrganizationService.java b/src/main/java/tech/crm/crmserver/service/OrganizationService.java index 08a1848..1029ea7 100644 --- a/src/main/java/tech/crm/crmserver/service/OrganizationService.java +++ b/src/main/java/tech/crm/crmserver/service/OrganizationService.java @@ -1,7 +1,7 @@ package tech.crm.crmserver.service; -import tech.crm.crmserver.dao.Organization; import com.baomidou.mybatisplus.extension.service.IService; +import tech.crm.crmserver.dao.Organization; import java.util.List; diff --git a/src/main/java/tech/crm/crmserver/service/PermissionService.java b/src/main/java/tech/crm/crmserver/service/PermissionService.java index 6488b9f..cfd0c3d 100644 --- a/src/main/java/tech/crm/crmserver/service/PermissionService.java +++ b/src/main/java/tech/crm/crmserver/service/PermissionService.java @@ -1,10 +1,9 @@ package tech.crm.crmserver.service; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import org.springframework.web.bind.annotation.RequestParam; +import com.baomidou.mybatisplus.extension.service.IService; import tech.crm.crmserver.common.enums.PermissionLevel; import tech.crm.crmserver.dao.Permission; -import com.baomidou.mybatisplus.extension.service.IService; import tech.crm.crmserver.dto.DepartmentDTO; import tech.crm.crmserver.dto.UserPermissionDTO; diff --git a/src/main/java/tech/crm/crmserver/service/ToDoListService.java b/src/main/java/tech/crm/crmserver/service/ToDoListService.java index 0768efb..acce4c2 100644 --- a/src/main/java/tech/crm/crmserver/service/ToDoListService.java +++ b/src/main/java/tech/crm/crmserver/service/ToDoListService.java @@ -1,7 +1,7 @@ package tech.crm.crmserver.service; -import tech.crm.crmserver.dao.ToDoList; import com.baomidou.mybatisplus.extension.service.IService; +import tech.crm.crmserver.dao.ToDoList; /** *

diff --git a/src/main/java/tech/crm/crmserver/service/TokenKeyService.java b/src/main/java/tech/crm/crmserver/service/TokenKeyService.java index 3ef334c..e9e4905 100644 --- a/src/main/java/tech/crm/crmserver/service/TokenKeyService.java +++ b/src/main/java/tech/crm/crmserver/service/TokenKeyService.java @@ -1,10 +1,9 @@ package tech.crm.crmserver.service; +import com.baomidou.mybatisplus.extension.service.IService; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import tech.crm.crmserver.dao.TokenKey; -import com.baomidou.mybatisplus.extension.service.IService; import tech.crm.crmserver.dao.User; -import tech.crm.crmserver.dto.LoginRequest; /** *

diff --git a/src/main/java/tech/crm/crmserver/service/UserService.java b/src/main/java/tech/crm/crmserver/service/UserService.java index 497c31a..c41780b 100644 --- a/src/main/java/tech/crm/crmserver/service/UserService.java +++ b/src/main/java/tech/crm/crmserver/service/UserService.java @@ -1,7 +1,7 @@ package tech.crm.crmserver.service; -import tech.crm.crmserver.dao.User; import com.baomidou.mybatisplus.extension.service.IService; +import tech.crm.crmserver.dao.User; import tech.crm.crmserver.dto.LoginRequest; import tech.crm.crmserver.dto.UserDTO; diff --git a/src/main/java/tech/crm/crmserver/service/impl/BelongToServiceImpl.java b/src/main/java/tech/crm/crmserver/service/impl/BelongToServiceImpl.java index 54714e2..915e841 100644 --- a/src/main/java/tech/crm/crmserver/service/impl/BelongToServiceImpl.java +++ b/src/main/java/tech/crm/crmserver/service/impl/BelongToServiceImpl.java @@ -1,13 +1,13 @@ package tech.crm.crmserver.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; import tech.crm.crmserver.common.enums.BelongToStatus; import tech.crm.crmserver.dao.BelongTo; import tech.crm.crmserver.mapper.BelongToMapper; import tech.crm.crmserver.service.BelongToService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; import java.util.List; diff --git a/src/main/java/tech/crm/crmserver/service/impl/ContactServiceImpl.java b/src/main/java/tech/crm/crmserver/service/impl/ContactServiceImpl.java index 15789cc..08a5706 100644 --- a/src/main/java/tech/crm/crmserver/service/impl/ContactServiceImpl.java +++ b/src/main/java/tech/crm/crmserver/service/impl/ContactServiceImpl.java @@ -2,7 +2,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; import tech.crm.crmserver.common.enums.PermissionLevel; import tech.crm.crmserver.common.utils.NullAwareBeanUtilsBean; import tech.crm.crmserver.dao.Contact; @@ -12,8 +14,6 @@ import tech.crm.crmserver.dto.ContactUpdateDTO; import tech.crm.crmserver.mapper.ContactMapper; import tech.crm.crmserver.service.*; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; import java.time.LocalDate; import java.util.ArrayList; diff --git a/src/main/java/tech/crm/crmserver/service/impl/DepartmentServiceImpl.java b/src/main/java/tech/crm/crmserver/service/impl/DepartmentServiceImpl.java index e4fb9ed..6428c70 100644 --- a/src/main/java/tech/crm/crmserver/service/impl/DepartmentServiceImpl.java +++ b/src/main/java/tech/crm/crmserver/service/impl/DepartmentServiceImpl.java @@ -1,9 +1,10 @@ package tech.crm.crmserver.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; import tech.crm.crmserver.common.enums.PermissionLevel; -import tech.crm.crmserver.dao.Contact; import tech.crm.crmserver.dao.Department; import tech.crm.crmserver.dao.Organization; import tech.crm.crmserver.dao.Permission; @@ -12,8 +13,6 @@ import tech.crm.crmserver.exception.OrganizationNotExistException; import tech.crm.crmserver.mapper.DepartmentMapper; import tech.crm.crmserver.service.*; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/tech/crm/crmserver/service/impl/EventServiceImpl.java b/src/main/java/tech/crm/crmserver/service/impl/EventServiceImpl.java index 3b5b037..19ca1cd 100644 --- a/src/main/java/tech/crm/crmserver/service/impl/EventServiceImpl.java +++ b/src/main/java/tech/crm/crmserver/service/impl/EventServiceImpl.java @@ -1,10 +1,10 @@ package tech.crm.crmserver.service.impl; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; import tech.crm.crmserver.dao.Event; import tech.crm.crmserver.mapper.EventMapper; import tech.crm.crmserver.service.EventService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; /** *

diff --git a/src/main/java/tech/crm/crmserver/service/impl/OrganizationServiceImpl.java b/src/main/java/tech/crm/crmserver/service/impl/OrganizationServiceImpl.java index e2aa0d3..2d595c9 100644 --- a/src/main/java/tech/crm/crmserver/service/impl/OrganizationServiceImpl.java +++ b/src/main/java/tech/crm/crmserver/service/impl/OrganizationServiceImpl.java @@ -1,7 +1,9 @@ package tech.crm.crmserver.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; import tech.crm.crmserver.dao.Organization; import tech.crm.crmserver.exception.NotEnoughPermissionException; import tech.crm.crmserver.exception.OrganizationNotExistException; @@ -9,8 +11,6 @@ import tech.crm.crmserver.service.BelongToService; import tech.crm.crmserver.service.DepartmentService; import tech.crm.crmserver.service.OrganizationService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; import tech.crm.crmserver.service.UserService; import java.util.HashMap; diff --git a/src/main/java/tech/crm/crmserver/service/impl/PermissionServiceImpl.java b/src/main/java/tech/crm/crmserver/service/impl/PermissionServiceImpl.java index 3d01a86..28e77ae 100644 --- a/src/main/java/tech/crm/crmserver/service/impl/PermissionServiceImpl.java +++ b/src/main/java/tech/crm/crmserver/service/impl/PermissionServiceImpl.java @@ -2,10 +2,11 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; +import org.springframework.stereotype.Service; import tech.crm.crmserver.common.enums.PermissionLevel; -import tech.crm.crmserver.common.response.ResponseResult; import tech.crm.crmserver.dao.Organization; import tech.crm.crmserver.dao.Permission; import tech.crm.crmserver.dto.DepartmentDTO; @@ -17,8 +18,6 @@ import tech.crm.crmserver.service.DepartmentService; import tech.crm.crmserver.service.OrganizationService; import tech.crm.crmserver.service.PermissionService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; import tech.crm.crmserver.service.UserService; import java.util.ArrayList; diff --git a/src/main/java/tech/crm/crmserver/service/impl/ToDoListServiceImpl.java b/src/main/java/tech/crm/crmserver/service/impl/ToDoListServiceImpl.java index 2297b9a..bba6363 100644 --- a/src/main/java/tech/crm/crmserver/service/impl/ToDoListServiceImpl.java +++ b/src/main/java/tech/crm/crmserver/service/impl/ToDoListServiceImpl.java @@ -1,10 +1,10 @@ package tech.crm.crmserver.service.impl; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; import tech.crm.crmserver.dao.ToDoList; import tech.crm.crmserver.mapper.ToDoListMapper; import tech.crm.crmserver.service.ToDoListService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; /** *

diff --git a/src/main/java/tech/crm/crmserver/service/impl/TokenKeyServiceImpl.java b/src/main/java/tech/crm/crmserver/service/impl/TokenKeyServiceImpl.java index 7826c6b..63addde 100644 --- a/src/main/java/tech/crm/crmserver/service/impl/TokenKeyServiceImpl.java +++ b/src/main/java/tech/crm/crmserver/service/impl/TokenKeyServiceImpl.java @@ -1,27 +1,22 @@ package tech.crm.crmserver.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import io.jsonwebtoken.security.Keys; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.AuthorityUtils; -import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Service; import tech.crm.crmserver.common.constants.SecurityConstants; import tech.crm.crmserver.dao.TokenKey; import tech.crm.crmserver.dao.User; -import tech.crm.crmserver.dto.LoginRequest; import tech.crm.crmserver.mapper.TokenKeyMapper; import tech.crm.crmserver.security.JwtSigningKeyResolver; import tech.crm.crmserver.service.TokenKeyService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; -import tech.crm.crmserver.service.UserService; import javax.crypto.SecretKey; import javax.xml.bind.DatatypeConverter; diff --git a/src/main/java/tech/crm/crmserver/service/impl/UserServiceImpl.java b/src/main/java/tech/crm/crmserver/service/impl/UserServiceImpl.java index f456145..26820a7 100644 --- a/src/main/java/tech/crm/crmserver/service/impl/UserServiceImpl.java +++ b/src/main/java/tech/crm/crmserver/service/impl/UserServiceImpl.java @@ -2,8 +2,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.authentication.BadCredentialsException; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.AuthorityUtils; @@ -12,6 +12,7 @@ import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.stereotype.Service; import tech.crm.crmserver.common.utils.NullAwareBeanUtilsBean; import tech.crm.crmserver.dao.User; import tech.crm.crmserver.dto.LoginRequest; @@ -23,8 +24,6 @@ import tech.crm.crmserver.service.MailService; import tech.crm.crmserver.service.TokenKeyService; import tech.crm.crmserver.service.UserService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; import java.util.List; import java.util.UUID;