장황하거나 중복 코드 구문, 코드 성숙도, 코드 스타일 이슈
This commit is contained in:
@@ -63,7 +63,7 @@ public class RoleUpdateAspect {
|
|||||||
|| currentRoles.stream().anyMatch(item -> !beforeRoles.contains(item))) {
|
|| currentRoles.stream().anyMatch(item -> !beforeRoles.contains(item))) {
|
||||||
createLog = true;
|
createLog = true;
|
||||||
}
|
}
|
||||||
} else if (currentRoles.size() > 0) {
|
} else if (!currentRoles.isEmpty()) {
|
||||||
createLog = true;
|
createLog = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class AdminSecurityConfig {
|
|||||||
List<String> permitPaths =
|
List<String> permitPaths =
|
||||||
Arrays.stream(PublicAccess.values())
|
Arrays.stream(PublicAccess.values())
|
||||||
.map(PublicAccess::getPath)
|
.map(PublicAccess::getPath)
|
||||||
.collect(Collectors.toList());
|
.toList();
|
||||||
|
|
||||||
http.authorizeHttpRequests(
|
http.authorizeHttpRequests(
|
||||||
(auth) ->
|
(auth) ->
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ package app.module.admin.config.application.security;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
import org.springframework.security.core.userdetails.User;
|
import org.springframework.security.core.userdetails.User;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
@Setter
|
||||||
public class AdminUser extends User {
|
public class AdminUser extends User {
|
||||||
private Long seq;
|
private Long seq;
|
||||||
private String roleId;
|
private String roleId;
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
package app.module.admin.config.application.util.model;
|
package app.module.admin.config.application.util.model;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
public class ExcelSheetDto {
|
public class ExcelSheetDto {
|
||||||
/**
|
/**
|
||||||
* 시트명
|
* 시트명
|
||||||
@@ -36,10 +40,4 @@ public class ExcelSheetDto {
|
|||||||
this.commaColumns = commaColumns;
|
this.commaColumns = commaColumns;
|
||||||
this.headerBgColors = headerBgColors;
|
this.headerBgColors = headerBgColors;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSheetName() { return sheetName; }
|
|
||||||
public List<String> getHeaders() { return headers; }
|
|
||||||
public List<List<String>> getData() { return data; }
|
|
||||||
public Set<Integer> getCommaColumns() { return commaColumns; }
|
|
||||||
public Map<Integer, IndexedColors> getHeaderBgColors() { return headerBgColors; }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ public class ExcelUtil {
|
|||||||
wb.write(responseOutputStream);
|
wb.write(responseOutputStream);
|
||||||
wb.close();
|
wb.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
log.error("[ExcelUtil] generateWithoutPassword: {}", e.getMessage(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class CreateCellService implements CreateCellPortIn {
|
|||||||
// 셀 스타일 적용 (null 체크)
|
// 셀 스타일 적용 (null 체크)
|
||||||
if (cellConfig.getCellStyle() != null) {
|
if (cellConfig.getCellStyle() != null) {
|
||||||
cell.setCellStyle(cellConfig.getCellStyle());
|
cell.setCellStyle(cellConfig.getCellStyle());
|
||||||
} else {
|
//} else {
|
||||||
// TODO: cellConfig.getCellStyle()이 null인 경우, 워크북에서 새로운 스타일을 생성하거나 기본 스타일을 적용하는 로직 고려
|
// TODO: cellConfig.getCellStyle()이 null인 경우, 워크북에서 새로운 스타일을 생성하거나 기본 스타일을 적용하는 로직 고려
|
||||||
// XSSFWorkbook workbook = (XSSFWorkbook) sheet.getWorkbook();
|
// XSSFWorkbook workbook = (XSSFWorkbook) sheet.getWorkbook();
|
||||||
// cell.setCellStyle(workbook.createCellStyle());
|
// cell.setCellStyle(workbook.createCellStyle());
|
||||||
|
|||||||
@@ -34,9 +34,9 @@ class URICurrentMatchingService implements URICurrentMatchingPortIn {
|
|||||||
// {{pathVar}} 을 가진 URI 라면 배열검증 수행
|
// {{pathVar}} 을 가진 URI 라면 배열검증 수행
|
||||||
if (comparePath.endsWith("/{{pathVar}}")) {
|
if (comparePath.endsWith("/{{pathVar}}")) {
|
||||||
List<String> pathComponents =
|
List<String> pathComponents =
|
||||||
Arrays.stream(comparePath.split("/")).collect(Collectors.toList());
|
Arrays.stream(comparePath.split("/")).toList();
|
||||||
List<String> targetComponents =
|
List<String> targetComponents =
|
||||||
Arrays.stream(targetUri.split("/")).collect(Collectors.toList());
|
Arrays.stream(targetUri.split("/")).toList();
|
||||||
|
|
||||||
if (pathComponents.size() != targetComponents.size()) {
|
if (pathComponents.size() != targetComponents.size()) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ public class FrontSecurityConfig {
|
|||||||
List<String> publicAccess =
|
List<String> publicAccess =
|
||||||
Arrays.stream(PublicAccess.values())
|
Arrays.stream(PublicAccess.values())
|
||||||
.map(PublicAccess::getPath)
|
.map(PublicAccess::getPath)
|
||||||
.collect(Collectors.toList());
|
.toList();
|
||||||
|
|
||||||
// front - 익명 사용자 접근 허용 URI 등록 (admin 과 달리 공개/비공개 URL 이 존재한다)
|
// front - 익명 사용자 접근 허용 URI 등록 (admin 과 달리 공개/비공개 URL 이 존재한다)
|
||||||
FrontPublicAccess.getInstance().setURIs(List.of("/", "/user/register", "/policy/**"));
|
FrontPublicAccess.getInstance().setURIs(List.of("/", "/user/register", "/policy/**"));
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ package app.module.front.config.application.security;
|
|||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
import org.springframework.security.core.userdetails.User;
|
import org.springframework.security.core.userdetails.User;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
@Setter
|
||||||
public class FrontUser extends User {
|
public class FrontUser extends User {
|
||||||
|
|
||||||
private String nickname;
|
private String nickname;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class DailyRecordController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping(path = "/{searchMonth}/{groupNo}/today-none")
|
@PostMapping(path = "/{searchMonth}/{groupNo}/today-none")
|
||||||
ResponseEntity<?> todayNone(@PathVariable("searchMonth") String searchMonth, @PathVariable("groupNo") String groupNo
|
ResponseEntity<?> todayNone(@PathVariable("searchMonth") String searchMonth, @PathVariable("groupNo") String groupNo
|
||||||
, @RequestParam(name = "target", required = true, defaultValue = "") String targetType
|
, @RequestParam(name = "target", defaultValue = "") String targetType
|
||||||
, @RequestParam(name = "status", required = false, defaultValue = "N") String targetStatus) {
|
, @RequestParam(name = "status", required = false, defaultValue = "N") String targetStatus) {
|
||||||
|
|
||||||
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
DailyUIReqVO reqVO = new DailyUIReqVO(searchMonth, groupNo);
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import java.util.List;
|
|||||||
@EqualsAndHashCode
|
@EqualsAndHashCode
|
||||||
public class CreateBankInputReqVO {
|
public class CreateBankInputReqVO {
|
||||||
|
|
||||||
|
|
||||||
// private Boolean status;
|
// private Boolean status;
|
||||||
private Long id;
|
private Long id;
|
||||||
private String transferType;
|
private String transferType;
|
||||||
@@ -22,9 +21,4 @@ public class CreateBankInputReqVO {
|
|||||||
return bankList != null ? bankList : new ArrayList<>();
|
return bankList != null ? bankList : new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBankList(List<CreateBankInputProductReqVO> bankList) {
|
|
||||||
this.bankList = bankList;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ import java.util.List;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@EqualsAndHashCode
|
@EqualsAndHashCode
|
||||||
public class CreateMonthlyReqVO {
|
public class CreateMonthlyReqVO {
|
||||||
|
|
||||||
|
|
||||||
private Boolean status;
|
private Boolean status;
|
||||||
private Long id;
|
private Long id;
|
||||||
private List<CreateMonthlyProductReqVO> productList;
|
private List<CreateMonthlyProductReqVO> productList;
|
||||||
@@ -20,10 +18,4 @@ public class CreateMonthlyReqVO {
|
|||||||
public List<CreateMonthlyProductReqVO> getProductList() {
|
public List<CreateMonthlyProductReqVO> getProductList() {
|
||||||
return productList != null ? productList : new ArrayList<>();
|
return productList != null ? productList : new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setProductList(List<CreateMonthlyProductReqVO> productList) {
|
|
||||||
this.productList = productList;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user