Skip to content

Commit

Permalink
Merge pull request #67 from is0xjh25/CI-test
Browse files Browse the repository at this point in the history
Optimize import
  • Loading branch information
HarryQin99 authored Sep 26, 2021
2 parents dbdeffd + 1847b21 commit 0bde378
Show file tree
Hide file tree
Showing 52 changed files with 76 additions and 141 deletions.
1 change: 0 additions & 1 deletion src/main/java/tech/crm/crmserver/CrmServerApplication.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

/**
* <p>
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/tech/crm/crmserver/config/WebMvcConfig.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.*;
Expand All @@ -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;

/**
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;


/**
* <p>
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tech/crm/crmserver/dao/BelongTo.java
Original file line number Diff line number Diff line change
@@ -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;

/**
* <p>
* entity
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/tech/crm/crmserver/dao/Contact.java
Original file line number Diff line number Diff line change
@@ -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;

/**
* <p>
* entity
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tech/crm/crmserver/dao/Department.java
Original file line number Diff line number Diff line change
@@ -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;

/**
* <p>
* entity
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/tech/crm/crmserver/dao/Event.java
Original file line number Diff line number Diff line change
@@ -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;

/**
* <p>
* entity
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tech/crm/crmserver/dao/Organization.java
Original file line number Diff line number Diff line change
@@ -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;

/**
* <p>
* entity
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tech/crm/crmserver/dao/Permission.java
Original file line number Diff line number Diff line change
@@ -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.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.PermissionLevel;
import tech.crm.crmserver.common.enums.Status;

import java.io.Serializable;

/**
* <p>
* entity
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/tech/crm/crmserver/dao/ToDoList.java
Original file line number Diff line number Diff line change
@@ -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;

/**
* <p>
* entity
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/tech/crm/crmserver/dao/TokenKey.java
Original file line number Diff line number Diff line change
@@ -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;

/**
* <p>
* entity
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/tech/crm/crmserver/dao/User.java
Original file line number Diff line number Diff line change
@@ -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;

/**
* <p>
* entity for data transfer with database
Expand Down
1 change: 0 additions & 1 deletion src/main/java/tech/crm/crmserver/dto/ContactCreateDTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/tech/crm/crmserver/dto/ContactUpdateDTO.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading

0 comments on commit 0bde378

Please sign in to comment.