refactor: remove unused imports and fields
This commit is contained in:
@@ -209,7 +209,6 @@ public class DepartmentView {
|
||||
private Long id;
|
||||
private String name;
|
||||
private Long parentId;
|
||||
private String treePath;
|
||||
private Integer sort;
|
||||
private Status status;
|
||||
private LocalDateTime createdAt;
|
||||
@@ -233,11 +232,6 @@ public class DepartmentView {
|
||||
return this;
|
||||
}
|
||||
|
||||
public DepartmentViewBuilder treePath(String treePath) {
|
||||
this.treePath = treePath;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DepartmentViewBuilder sort(Integer sort) {
|
||||
this.sort = sort;
|
||||
return this;
|
||||
|
||||
-1
@@ -2,7 +2,6 @@ package com.onixbyte.helix.security.entrypoint;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.onixbyte.helix.domain.web.response.BizExceptionResponse;
|
||||
import jakarta.servlet.ServletException;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.onixbyte.helix.service;
|
||||
import com.onixbyte.helix.domain.entity.Setting;
|
||||
import com.onixbyte.helix.domain.entity.User;
|
||||
import com.onixbyte.helix.domain.web.request.LoginRequest;
|
||||
import com.onixbyte.helix.enumeration.ApplicationMode;
|
||||
import com.onixbyte.helix.exception.BizException;
|
||||
import com.onixbyte.helix.manager.ApplicationManager;
|
||||
import com.onixbyte.helix.manager.CaptchaManager;
|
||||
@@ -104,12 +103,8 @@ public class AuthService {
|
||||
|
||||
var applicationMode = applicationManager.getApplicationMode();
|
||||
switch (applicationMode) {
|
||||
case PRODUCTION -> {
|
||||
cookieBuilder.httpOnly(true);
|
||||
}
|
||||
case DEVELOPMENT -> {
|
||||
cookieBuilder.sameSite("NONE");
|
||||
}
|
||||
case PRODUCTION -> cookieBuilder.httpOnly(true);
|
||||
case DEVELOPMENT -> cookieBuilder.sameSite("NONE");
|
||||
case null, default -> {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,14 +12,11 @@ import com.onixbyte.helix.domain.web.request.ResetPasswordRequest;
|
||||
import com.onixbyte.helix.domain.web.request.EditUserRequest;
|
||||
import com.onixbyte.helix.domain.web.response.UserDetailResponse;
|
||||
import com.onixbyte.helix.manager.*;
|
||||
import com.onixbyte.helix.mapper.UserCredentialMapper;
|
||||
import com.onixbyte.helix.repository.UserCredentialRepository;
|
||||
import com.onixbyte.identitygenerator.IdentityGenerator;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -33,12 +30,9 @@ public class UserService {
|
||||
private final IdentityGenerator<Long> userIdentityGenerator;
|
||||
private final RoleManager roleManager;
|
||||
private final UserRoleManager userRoleManager;
|
||||
private final PasswordEncoder passwordEncoder;
|
||||
private final ApplicationManager applicationManager;
|
||||
private final DepartmentManager departmentManager;
|
||||
private final PositionManager positionManager;
|
||||
private final UserCredentialRepository userCredentialRepository;
|
||||
private final UserCredentialMapper userCredentialMapper;
|
||||
|
||||
@Autowired
|
||||
public UserService(
|
||||
@@ -46,21 +40,17 @@ public class UserService {
|
||||
IdentityGenerator<Long> userIdentityGenerator,
|
||||
RoleManager roleManager,
|
||||
UserRoleManager userRoleManager,
|
||||
PasswordEncoder passwordEncoder,
|
||||
ApplicationManager applicationManager,
|
||||
DepartmentManager departmentManager,
|
||||
PositionManager positionManager,
|
||||
UserCredentialRepository userCredentialRepository, UserCredentialMapper userCredentialMapper) {
|
||||
PositionManager positionManager
|
||||
) {
|
||||
this.userManager = userManager;
|
||||
this.userIdentityGenerator = userIdentityGenerator;
|
||||
this.roleManager = roleManager;
|
||||
this.userRoleManager = userRoleManager;
|
||||
this.passwordEncoder = passwordEncoder;
|
||||
this.applicationManager = applicationManager;
|
||||
this.departmentManager = departmentManager;
|
||||
this.positionManager = positionManager;
|
||||
this.userCredentialRepository = userCredentialRepository;
|
||||
this.userCredentialMapper = userCredentialMapper;
|
||||
}
|
||||
|
||||
public Page<UserDetailResponse> queryUserDetailsPage(Pageable pageable, QueryUserRequest request) {
|
||||
|
||||
Reference in New Issue
Block a user