Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f389d652d6 | |||
| 23efdf4b9a |
@@ -1,34 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'java-library'
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
api 'org.springframework.boot:spring-boot-starter'
|
|
||||||
api 'org.springframework.boot:spring-boot-starter-web'
|
|
||||||
api 'org.springframework.boot:spring-boot-starter-validation'
|
|
||||||
api 'org.springframework.boot:spring-boot-starter-security'
|
|
||||||
api 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.3'
|
|
||||||
|
|
||||||
api 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.27'
|
|
||||||
|
|
||||||
implementation 'io.jsonwebtoken:jjwt-api:0.11.5'
|
|
||||||
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.11.5'
|
|
||||||
runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.11.5'
|
|
||||||
|
|
||||||
implementation 'org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16'
|
|
||||||
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
|
|
||||||
|
|
||||||
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client'
|
|
||||||
runtimeOnly 'com.microsoft.sqlserver:mssql-jdbc:12.8.1.jre11'
|
|
||||||
|
|
||||||
compileOnly 'org.projectlombok:lombok'
|
|
||||||
annotationProcessor 'org.projectlombok:lombok'
|
|
||||||
|
|
||||||
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
|
|
||||||
|
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
|
||||||
}
|
|
||||||
|
|
||||||
jar {
|
|
||||||
enabled = true
|
|
||||||
}
|
|
||||||
-155
@@ -1,155 +0,0 @@
|
|||||||
package com.alist.api.core.common.file.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.config.file.FileUploadProperties;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import javax.imageio.IIOImage;
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.imageio.ImageWriteParam;
|
|
||||||
import javax.imageio.ImageWriter;
|
|
||||||
import javax.imageio.stream.ImageOutputStream;
|
|
||||||
import java.awt.Graphics2D;
|
|
||||||
import java.awt.RenderingHints;
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.util.Iterator;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class FileImageService {
|
|
||||||
public record ImageSize(int width, int height) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImageSize resizeAndSave(MultipartFile multipartFile, Path savePath, FileUploadProperties.Resize resize, String extension) throws IOException {
|
|
||||||
BufferedImage source = ImageIO.read(multipartFile.getInputStream());
|
|
||||||
|
|
||||||
if (source == null) {
|
|
||||||
throw new IllegalArgumentException("invalid image");
|
|
||||||
}
|
|
||||||
|
|
||||||
BufferedImage target;
|
|
||||||
|
|
||||||
if (resize.getWidth() != null && resize.getHeight() != null) {
|
|
||||||
target = cropAndResize(source, resize.getWidth(), resize.getHeight());
|
|
||||||
} else if (resize.getMaxWidth() != null && source.getWidth() > resize.getMaxWidth()) {
|
|
||||||
target = resizeByMaxWidth(source, resize.getMaxWidth());
|
|
||||||
} else {
|
|
||||||
target = source;
|
|
||||||
}
|
|
||||||
|
|
||||||
writeImage(target, imageFormat(extension), savePath, resize.getQuality());
|
|
||||||
|
|
||||||
return new ImageSize(target.getWidth(), target.getHeight());
|
|
||||||
}
|
|
||||||
|
|
||||||
public ImageSize readSize(Path path) throws IOException {
|
|
||||||
BufferedImage image = ImageIO.read(path.toFile());
|
|
||||||
|
|
||||||
if (image == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return new ImageSize(image.getWidth(), image.getHeight());
|
|
||||||
}
|
|
||||||
|
|
||||||
private BufferedImage cropAndResize(BufferedImage source, int targetWidth, int targetHeight) {
|
|
||||||
double targetRatio = (double) targetWidth / targetHeight;
|
|
||||||
int sourceWidth = source.getWidth();
|
|
||||||
int sourceHeight = source.getHeight();
|
|
||||||
double sourceRatio = (double) sourceWidth / sourceHeight;
|
|
||||||
int cropWidth = sourceWidth;
|
|
||||||
int cropHeight = sourceHeight;
|
|
||||||
|
|
||||||
if (sourceRatio > targetRatio) {
|
|
||||||
cropWidth = (int) Math.round(sourceHeight * targetRatio);
|
|
||||||
} else {
|
|
||||||
cropHeight = (int) Math.round(sourceWidth / targetRatio);
|
|
||||||
}
|
|
||||||
|
|
||||||
BufferedImage cropped = source.getSubimage(
|
|
||||||
(sourceWidth - cropWidth) / 2
|
|
||||||
, (sourceHeight - cropHeight) / 2
|
|
||||||
, cropWidth
|
|
||||||
, cropHeight
|
|
||||||
);
|
|
||||||
|
|
||||||
return resize(cropped, targetWidth, targetHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
private BufferedImage resizeByMaxWidth(BufferedImage source, int maxWidth) {
|
|
||||||
int targetWidth = maxWidth;
|
|
||||||
int targetHeight = (int) Math.round((double) source.getHeight() * targetWidth / source.getWidth());
|
|
||||||
|
|
||||||
return resize(source, targetWidth, targetHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
private BufferedImage resize(BufferedImage source, int width, int height) {
|
|
||||||
BufferedImage target = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
|
|
||||||
Graphics2D graphics = target.createGraphics();
|
|
||||||
|
|
||||||
graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC);
|
|
||||||
graphics.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
|
|
||||||
graphics.drawImage(source, 0, 0, width, height, null);
|
|
||||||
graphics.dispose();
|
|
||||||
|
|
||||||
return target;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void writeImage(BufferedImage image, String format, Path savePath, Float quality) throws IOException {
|
|
||||||
if (!"jpeg".equals(format)) {
|
|
||||||
boolean written = ImageIO.write(image, format, savePath.toFile());
|
|
||||||
|
|
||||||
if (!written) {
|
|
||||||
throw new IllegalArgumentException("unsupported image format");
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Iterator<ImageWriter> writers = ImageIO.getImageWritersByFormatName("jpeg");
|
|
||||||
|
|
||||||
if (!writers.hasNext()) {
|
|
||||||
throw new IllegalArgumentException("unsupported image format");
|
|
||||||
}
|
|
||||||
|
|
||||||
ImageWriter writer = writers.next();
|
|
||||||
ImageWriteParam parameter = writer.getDefaultWriteParam();
|
|
||||||
|
|
||||||
if (parameter.canWriteCompressed()) {
|
|
||||||
parameter.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
|
|
||||||
parameter.setCompressionQuality(normalizeQuality(quality));
|
|
||||||
}
|
|
||||||
|
|
||||||
try (ImageOutputStream output = ImageIO.createImageOutputStream(savePath.toFile())) {
|
|
||||||
writer.setOutput(output);
|
|
||||||
writer.write(null, new IIOImage(image, null, null), parameter);
|
|
||||||
} finally {
|
|
||||||
writer.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private float normalizeQuality(Float quality) {
|
|
||||||
if (quality == null) {
|
|
||||||
return 0.9f;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quality < 0.0f) {
|
|
||||||
return 0.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quality > 1.0f) {
|
|
||||||
return 1.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
return quality;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String imageFormat(String extension) {
|
|
||||||
if ("jpg".equalsIgnoreCase(extension)) {
|
|
||||||
return "jpeg";
|
|
||||||
}
|
|
||||||
|
|
||||||
return extension.toLowerCase();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-288
@@ -1,288 +0,0 @@
|
|||||||
package com.alist.api.core.common.file.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.common.file.vo.FileStorageUploadVo;
|
|
||||||
import com.alist.api.core.config.file.FileUploadProperties;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.core.io.InputStreamResource;
|
|
||||||
import org.springframework.core.io.Resource;
|
|
||||||
import org.springframework.http.ContentDisposition;
|
|
||||||
import org.springframework.http.HttpHeaders;
|
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
import org.springframework.http.ResponseEntity;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.nio.file.Files;
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class FileStorageService {
|
|
||||||
private static final String PUBLIC_PREFIX = "/uploads";
|
|
||||||
|
|
||||||
@Value("${file.storage.root-path}")
|
|
||||||
private String rootPath;
|
|
||||||
|
|
||||||
@Value("${file.storage.view-domain}")
|
|
||||||
private String viewDomain;
|
|
||||||
|
|
||||||
private final FileUploadProperties fileUploadProperties;
|
|
||||||
private final FileImageService fileImageService;
|
|
||||||
|
|
||||||
public FileStorageService(FileUploadProperties fileUploadProperties, FileImageService fileImageService) {
|
|
||||||
this.fileUploadProperties = fileUploadProperties;
|
|
||||||
this.fileImageService = fileImageService;
|
|
||||||
}
|
|
||||||
|
|
||||||
public FileStorageUploadVo saveFileUpload(String folder, MultipartFile multipartFile) {
|
|
||||||
if (folder == null || folder.isBlank()) {
|
|
||||||
throw new IllegalArgumentException("invalid folder");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (multipartFile == null || multipartFile.isEmpty()) {
|
|
||||||
throw new IllegalArgumentException("empty file");
|
|
||||||
}
|
|
||||||
|
|
||||||
FileUploadProperties.UploadType uploadType = resolveUploadType(folder);
|
|
||||||
String originalFileName = cleanFileName(multipartFile.getOriginalFilename());
|
|
||||||
String extension = extractExtension(originalFileName);
|
|
||||||
|
|
||||||
validateExtension(extension);
|
|
||||||
validateSize(multipartFile.getSize(), uploadType);
|
|
||||||
|
|
||||||
boolean image = isImageExtension(extension);
|
|
||||||
|
|
||||||
if (uploadType.isImageOnly() && !image) {
|
|
||||||
throw new IllegalArgumentException("image only");
|
|
||||||
}
|
|
||||||
|
|
||||||
LocalDate today = LocalDate.now();
|
|
||||||
String storedFileName = UUID.randomUUID().toString().replace("-", "") + "." + extension;
|
|
||||||
Path savePath = Paths.get(
|
|
||||||
rootPath
|
|
||||||
, uploadType.getFolder()
|
|
||||||
, String.valueOf(today.getYear())
|
|
||||||
, "%02d".formatted(today.getMonthValue())
|
|
||||||
, "%02d".formatted(today.getDayOfMonth())
|
|
||||||
, storedFileName
|
|
||||||
).normalize().toAbsolutePath();
|
|
||||||
|
|
||||||
ensureUnderRoot(savePath);
|
|
||||||
|
|
||||||
try {
|
|
||||||
Files.createDirectories(savePath.getParent());
|
|
||||||
|
|
||||||
FileImageService.ImageSize imageSize = null;
|
|
||||||
|
|
||||||
if (image && uploadType.getResize() != null && uploadType.getResize().isEnabled()) {
|
|
||||||
imageSize = fileImageService.resizeAndSave(multipartFile, savePath, uploadType.getResize(), extension);
|
|
||||||
} else {
|
|
||||||
multipartFile.transferTo(savePath);
|
|
||||||
|
|
||||||
if (image) {
|
|
||||||
imageSize = fileImageService.readSize(savePath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
FileStorageUploadVo fileStorageUploadVo = new FileStorageUploadVo();
|
|
||||||
fileStorageUploadVo.setUploadPath(toUploadPath(savePath));
|
|
||||||
fileStorageUploadVo.setOriginalFileName(originalFileName);
|
|
||||||
fileStorageUploadVo.setStoredFileName(storedFileName);
|
|
||||||
fileStorageUploadVo.setFileExtension(extension);
|
|
||||||
fileStorageUploadVo.setContentType(multipartFile.getContentType());
|
|
||||||
fileStorageUploadVo.setFileSize(Files.size(savePath));
|
|
||||||
fileStorageUploadVo.setWidth(imageSize == null ? null : imageSize.width());
|
|
||||||
fileStorageUploadVo.setHeight(imageSize == null ? null : imageSize.height());
|
|
||||||
|
|
||||||
return fileStorageUploadVo;
|
|
||||||
} catch (IOException exception) {
|
|
||||||
throw new IllegalStateException("file save failed", exception);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ResponseEntity<Resource> loadFileResource(String uploadPath, boolean inline) {
|
|
||||||
try {
|
|
||||||
Path filePath = resolveUploadPath(uploadPath);
|
|
||||||
|
|
||||||
if (!Files.exists(filePath) || !Files.isRegularFile(filePath)) {
|
|
||||||
return ResponseEntity.notFound().build();
|
|
||||||
}
|
|
||||||
|
|
||||||
String contentType = Files.probeContentType(filePath);
|
|
||||||
|
|
||||||
if (contentType == null || contentType.isBlank()) {
|
|
||||||
contentType = MediaType.APPLICATION_OCTET_STREAM_VALUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
ContentDisposition contentDisposition = inline
|
|
||||||
? ContentDisposition.inline().filename(filePath.getFileName().toString(), StandardCharsets.UTF_8).build()
|
|
||||||
: ContentDisposition.attachment().filename(filePath.getFileName().toString(), StandardCharsets.UTF_8).build();
|
|
||||||
|
|
||||||
return ResponseEntity.ok()
|
|
||||||
.contentType(MediaType.parseMediaType(contentType))
|
|
||||||
.contentLength(Files.size(filePath))
|
|
||||||
.header(HttpHeaders.CONTENT_DISPOSITION, contentDisposition.toString())
|
|
||||||
.body(new InputStreamResource(Files.newInputStream(filePath)));
|
|
||||||
} catch (IOException exception) {
|
|
||||||
throw new IllegalStateException("file read failed", exception);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public String buildFileViewUrl(String uploadPath) {
|
|
||||||
if (viewDomain == null || viewDomain.isBlank()) {
|
|
||||||
throw new IllegalStateException("file.storage.view-domain is empty");
|
|
||||||
}
|
|
||||||
|
|
||||||
String fileDomain = viewDomain.endsWith("/")
|
|
||||||
? viewDomain.substring(0, viewDomain.length() - 1)
|
|
||||||
: viewDomain;
|
|
||||||
String normalizedUploadPath = uploadPath.startsWith("/") ? uploadPath : "/" + uploadPath;
|
|
||||||
|
|
||||||
return fileDomain + normalizedUploadPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Path resolveUploadPath(String uploadPath) {
|
|
||||||
if (uploadPath == null || uploadPath.isBlank()) {
|
|
||||||
throw new IllegalArgumentException("empty path");
|
|
||||||
}
|
|
||||||
|
|
||||||
String normalizedUploadPath = uploadPath.trim().replace("\\", "/");
|
|
||||||
|
|
||||||
if (!normalizedUploadPath.startsWith(PUBLIC_PREFIX + "/")) {
|
|
||||||
throw new IllegalArgumentException("invalid path");
|
|
||||||
}
|
|
||||||
|
|
||||||
String relativePath = normalizedUploadPath.substring((PUBLIC_PREFIX + "/").length());
|
|
||||||
|
|
||||||
if (relativePath.contains("..") || relativePath.startsWith("/") || relativePath.contains(":")) {
|
|
||||||
throw new IllegalArgumentException("invalid path");
|
|
||||||
}
|
|
||||||
|
|
||||||
Path rootPath = rootPath();
|
|
||||||
Path resolvedPath = rootPath.resolve(relativePath).normalize().toAbsolutePath();
|
|
||||||
|
|
||||||
if (!resolvedPath.startsWith(rootPath)) {
|
|
||||||
throw new IllegalArgumentException("invalid path");
|
|
||||||
}
|
|
||||||
|
|
||||||
return resolvedPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String toUploadPath(Path savePath) {
|
|
||||||
Path rootPath = rootPath();
|
|
||||||
Path absolutePath = savePath.normalize().toAbsolutePath();
|
|
||||||
|
|
||||||
if (!absolutePath.startsWith(rootPath)) {
|
|
||||||
throw new IllegalArgumentException("invalid path");
|
|
||||||
}
|
|
||||||
|
|
||||||
return PUBLIC_PREFIX + "/" + rootPath.relativize(absolutePath).toString().replace("\\", "/");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ensureUnderRoot(Path path) {
|
|
||||||
if (!path.startsWith(rootPath())) {
|
|
||||||
throw new IllegalArgumentException("invalid save path");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private Path rootPath() {
|
|
||||||
return Paths.get(rootPath).normalize().toAbsolutePath();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateSize(long fileSize, FileUploadProperties.UploadType uploadType) {
|
|
||||||
long maxSize = uploadType.getMaxSize() == null
|
|
||||||
? fileUploadProperties.getMaxSize().toBytes()
|
|
||||||
: uploadType.getMaxSize().toBytes();
|
|
||||||
|
|
||||||
if (fileSize > maxSize) {
|
|
||||||
throw new IllegalArgumentException("file size exceeded");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateExtension(String extension) {
|
|
||||||
if (extension.isBlank() || fileUploadProperties.getAllowedExtensions().stream().noneMatch(extension::equalsIgnoreCase)) {
|
|
||||||
throw new IllegalArgumentException("invalid extension");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private String cleanFileName(String fileName) {
|
|
||||||
if (fileName == null || fileName.isBlank()) {
|
|
||||||
throw new IllegalArgumentException("empty file name");
|
|
||||||
}
|
|
||||||
|
|
||||||
return Paths.get(fileName).getFileName().toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
private String extractExtension(String fileName) {
|
|
||||||
int extensionIndex = fileName.lastIndexOf('.');
|
|
||||||
|
|
||||||
if (extensionIndex < 0 || extensionIndex == fileName.length() - 1) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
return fileName.substring(extensionIndex + 1).trim().toLowerCase(Locale.ROOT);
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isImageExtension(String extension) {
|
|
||||||
return "jpg".equals(extension)
|
|
||||||
|| "jpeg".equals(extension)
|
|
||||||
|| "png".equals(extension)
|
|
||||||
|| "gif".equals(extension);
|
|
||||||
}
|
|
||||||
|
|
||||||
private FileUploadProperties.UploadType resolveUploadType(String folder) {
|
|
||||||
String normalizedFolder = normalizeFolder(folder);
|
|
||||||
FileUploadProperties.UploadType uploadType = fileUploadProperties.getTypes() == null
|
|
||||||
? null
|
|
||||||
: fileUploadProperties.getTypes().get(normalizedFolder);
|
|
||||||
|
|
||||||
if (uploadType != null) {
|
|
||||||
uploadType.setFolder(normalizeFolder(uploadType.getFolder()));
|
|
||||||
return uploadType;
|
|
||||||
}
|
|
||||||
|
|
||||||
FileUploadProperties.UploadType fallbackUploadType = new FileUploadProperties.UploadType();
|
|
||||||
fallbackUploadType.setFolder(normalizedFolder);
|
|
||||||
fallbackUploadType.setMaxSize(null);
|
|
||||||
fallbackUploadType.setImageOnly(false);
|
|
||||||
fallbackUploadType.setResize(new FileUploadProperties.Resize());
|
|
||||||
fallbackUploadType.getResize().setEnabled(false);
|
|
||||||
|
|
||||||
return fallbackUploadType;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String normalizeFolder(String folder) {
|
|
||||||
if (folder == null || folder.isBlank()) {
|
|
||||||
throw new IllegalArgumentException("invalid folder");
|
|
||||||
}
|
|
||||||
|
|
||||||
String normalizedFolder = folder.trim().replace("\\", "/");
|
|
||||||
|
|
||||||
while (normalizedFolder.startsWith("/")) {
|
|
||||||
normalizedFolder = normalizedFolder.substring(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
while (normalizedFolder.endsWith("/")) {
|
|
||||||
normalizedFolder = normalizedFolder.substring(0, normalizedFolder.length() - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (normalizedFolder.isBlank()
|
|
||||||
|| normalizedFolder.contains("..")
|
|
||||||
|| normalizedFolder.contains(":")
|
|
||||||
|| normalizedFolder.startsWith("http://")
|
|
||||||
|| normalizedFolder.startsWith("https://")) {
|
|
||||||
throw new IllegalArgumentException("invalid folder");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!normalizedFolder.matches("^[a-zA-Z0-9/_-]+$")) {
|
|
||||||
throw new IllegalArgumentException("invalid folder");
|
|
||||||
}
|
|
||||||
|
|
||||||
return normalizedFolder;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
package com.alist.api.core.common.file.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileStorageUploadVo {
|
|
||||||
private String uploadPath;
|
|
||||||
private String originalFileName;
|
|
||||||
private String storedFileName;
|
|
||||||
private String fileExtension;
|
|
||||||
private String contentType;
|
|
||||||
private Long fileSize;
|
|
||||||
private Integer width;
|
|
||||||
private Integer height;
|
|
||||||
}
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
package com.alist.api.core.common.jwt;
|
|
||||||
|
|
||||||
import jakarta.servlet.FilterChain;
|
|
||||||
import jakarta.servlet.ServletException;
|
|
||||||
import jakarta.servlet.http.Cookie;
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.http.HttpHeaders;
|
|
||||||
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
|
||||||
import org.springframework.security.core.authority.SimpleGrantedAuthority;
|
|
||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
|
||||||
import org.springframework.security.web.authentication.WebAuthenticationDetailsSource;
|
|
||||||
import org.springframework.web.filter.OncePerRequestFilter;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class JwtAuthenticationFilter extends OncePerRequestFilter {
|
|
||||||
private final JwtTokenProvider jwtTokenProvider;
|
|
||||||
private final String requiredScope;
|
|
||||||
private final String accessTokenCookieName;
|
|
||||||
|
|
||||||
public JwtAuthenticationFilter(
|
|
||||||
JwtTokenProvider jwtTokenProvider,
|
|
||||||
String requiredScope,
|
|
||||||
String accessTokenCookieName
|
|
||||||
) {
|
|
||||||
this.jwtTokenProvider = jwtTokenProvider;
|
|
||||||
this.requiredScope = requiredScope;
|
|
||||||
this.accessTokenCookieName = accessTokenCookieName;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doFilterInternal(
|
|
||||||
HttpServletRequest request,
|
|
||||||
HttpServletResponse response,
|
|
||||||
FilterChain filterChain
|
|
||||||
) throws ServletException, IOException {
|
|
||||||
try {
|
|
||||||
String token = resolveToken(request);
|
|
||||||
|
|
||||||
if (token != null && jwtTokenProvider.validateToken(token)) {
|
|
||||||
String principal = jwtTokenProvider.getUserTokenIdx(token);
|
|
||||||
String role = jwtTokenProvider.getRole(token);
|
|
||||||
String scope = jwtTokenProvider.getScope(token);
|
|
||||||
String tokenType = jwtTokenProvider.getTokenType(token);
|
|
||||||
|
|
||||||
boolean authenticatable =
|
|
||||||
requiredScope.equals(scope)
|
|
||||||
&& role != null
|
|
||||||
&& "ACCESS".equals(tokenType);
|
|
||||||
|
|
||||||
if (authenticatable) {
|
|
||||||
UsernamePasswordAuthenticationToken authentication =
|
|
||||||
new UsernamePasswordAuthenticationToken(
|
|
||||||
principal,
|
|
||||||
null,
|
|
||||||
List.of(new SimpleGrantedAuthority("ROLE_" + role))
|
|
||||||
);
|
|
||||||
|
|
||||||
authentication.setDetails(
|
|
||||||
new WebAuthenticationDetailsSource().buildDetails(request)
|
|
||||||
);
|
|
||||||
|
|
||||||
SecurityContextHolder.getContext().setAuthentication(authentication);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
SecurityContextHolder.clearContext();
|
|
||||||
}
|
|
||||||
|
|
||||||
filterChain.doFilter(request, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
private String resolveToken(HttpServletRequest request) {
|
|
||||||
String bearer = request.getHeader(HttpHeaders.AUTHORIZATION);
|
|
||||||
if (bearer != null && bearer.startsWith("Bearer ")) {
|
|
||||||
String token = bearer.substring(7).trim();
|
|
||||||
if (!token.isEmpty()) {
|
|
||||||
return token;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Cookie[] cookies = request.getCookies();
|
|
||||||
if (cookies == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (Cookie cookie : cookies) {
|
|
||||||
if (accessTokenCookieName.equals(cookie.getName())) {
|
|
||||||
String token = cookie.getValue();
|
|
||||||
|
|
||||||
if (token != null && !token.isBlank()) {
|
|
||||||
return token.trim();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
package com.alist.api.core.common.paging;
|
|
||||||
|
|
||||||
import com.alist.api.core.common.utils.PagingUtil;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Setter
|
|
||||||
public class PagingRequest {
|
|
||||||
@Schema(description = "페이지 번호", example = "1")
|
|
||||||
private Integer page;
|
|
||||||
|
|
||||||
@Schema(description = "페이지 크기", example = "20")
|
|
||||||
private Integer size;
|
|
||||||
|
|
||||||
public Integer getPage() {
|
|
||||||
return PagingUtil.getPage(page);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getSize() {
|
|
||||||
return PagingUtil.getSize(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Schema(hidden = true)
|
|
||||||
public Integer getLimit() {
|
|
||||||
return PagingUtil.getLimit(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Schema(hidden = true)
|
|
||||||
public Integer getOffset() {
|
|
||||||
return PagingUtil.getOffset(page, size);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
package com.alist.api.core.common.paging;
|
|
||||||
|
|
||||||
import com.alist.api.core.common.utils.PagingUtil;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class PagingResponse {
|
|
||||||
@Schema(description = "현재 페이지 번호", example = "1")
|
|
||||||
private int page;
|
|
||||||
|
|
||||||
@Schema(description = "페이지당 조회 개수", example = "20")
|
|
||||||
private int size;
|
|
||||||
|
|
||||||
@Schema(description = "전체 데이터 개수", example = "100")
|
|
||||||
private int totalCount;
|
|
||||||
|
|
||||||
@Schema(description = "전체 페이지 수", example = "5")
|
|
||||||
private int totalPage;
|
|
||||||
|
|
||||||
@Schema(
|
|
||||||
description = "현재 페이지 첫 번째 row 번호. 각 row 번호는 rowStartNum - memberList index로 계산합니다.",
|
|
||||||
example = "100"
|
|
||||||
)
|
|
||||||
private int rowStartNum;
|
|
||||||
|
|
||||||
public void setPaging(PagingRequest pagingRequest, int totalCount) {
|
|
||||||
this.page = pagingRequest.getPage();
|
|
||||||
this.size = pagingRequest.getSize();
|
|
||||||
this.totalCount = totalCount;
|
|
||||||
this.totalPage = PagingUtil.getTotalPage(totalCount, pagingRequest.getSize());
|
|
||||||
this.rowStartNum = PagingUtil.getRowStartNum(totalCount, pagingRequest.getPage(), pagingRequest.getSize());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
package com.alist.api.core.common.utils;
|
|
||||||
|
|
||||||
public final class PagingUtil {
|
|
||||||
private static final int DEFAULT_PAGE = 1;
|
|
||||||
private static final int DEFAULT_SIZE = 10;
|
|
||||||
private static final int MAX_SIZE = 100;
|
|
||||||
|
|
||||||
private PagingUtil() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getPage(Integer page) {
|
|
||||||
return page == null || page < 1 ? DEFAULT_PAGE : page;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getSize(Integer size) {
|
|
||||||
if (size == null || size < 1) {
|
|
||||||
return DEFAULT_SIZE;
|
|
||||||
}
|
|
||||||
return Math.min(size, MAX_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getLimit(Integer size) {
|
|
||||||
return getSize(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getOffset(Integer page, Integer size) {
|
|
||||||
return (getPage(page) - 1) * getSize(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getTotalPage(int totalCount, Integer size) {
|
|
||||||
return totalCount <= 0 ? 0 : (int) Math.ceil((double) totalCount / getSize(size));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int getRowStartNum(int totalCount, Integer page, Integer size) {
|
|
||||||
if (totalCount <= 0) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int offset = getOffset(page, size);
|
|
||||||
int rowStartNum = totalCount - offset;
|
|
||||||
|
|
||||||
return Math.max(rowStartNum, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package com.alist.api.core.config;
|
|
||||||
|
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@ComponentScan("com.alist.api.core")
|
|
||||||
public class ApiCoreConfig {
|
|
||||||
}
|
|
||||||
@@ -1,89 +0,0 @@
|
|||||||
package com.alist.api.core.config.cors;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.standard.testCorsAllowedList.service.TestCorsAllowedListService;
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import jakarta.annotation.PostConstruct;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@Slf4j
|
|
||||||
@Component
|
|
||||||
public class CorsCache {
|
|
||||||
public static final String REDIS_KEY = "alist:cors:allow-origins";
|
|
||||||
|
|
||||||
private final StringRedisTemplate stringRedisTemplate;
|
|
||||||
private final ObjectMapper objectMapper;
|
|
||||||
private final TestCorsAllowedListService testCorsAllowedListService;
|
|
||||||
|
|
||||||
private volatile List<String> allowedOriginList = List.of();
|
|
||||||
|
|
||||||
public CorsCache(StringRedisTemplate stringRedisTemplate, ObjectMapper objectMapper, TestCorsAllowedListService testCorsAllowedListService) {
|
|
||||||
this.stringRedisTemplate = stringRedisTemplate;
|
|
||||||
this.objectMapper = objectMapper;
|
|
||||||
this.testCorsAllowedListService = testCorsAllowedListService;
|
|
||||||
}
|
|
||||||
|
|
||||||
@PostConstruct
|
|
||||||
public void initialize() {
|
|
||||||
refreshFromRedis();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Scheduled(fixedDelayString = "${cors.cache.redis-refresh-interval-ms:60000}")
|
|
||||||
public void refreshFromRedis() {
|
|
||||||
String allowedOriginJson = stringRedisTemplate.opsForValue().get(REDIS_KEY);
|
|
||||||
|
|
||||||
if (allowedOriginJson == null || allowedOriginJson.isBlank()) {
|
|
||||||
allowedOriginList = List.of();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
List<String> redisAllowedOriginList = objectMapper.readValue(allowedOriginJson, new TypeReference<List<String>>() {
|
|
||||||
});
|
|
||||||
|
|
||||||
allowedOriginList = redisAllowedOriginList.stream()
|
|
||||||
.filter(Objects::nonNull)
|
|
||||||
.map(String::trim)
|
|
||||||
.filter(allowedOrigin -> !allowedOrigin.isEmpty())
|
|
||||||
.distinct()
|
|
||||||
.toList();
|
|
||||||
} catch (JsonProcessingException e) {
|
|
||||||
log.error("CORS Redis cache JSON parsing failed.", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void syncFromDatabase() {
|
|
||||||
List<String> databaseAllowedOriginList = testCorsAllowedListService.selectTestCorsAllowedListAllowedOriginList();
|
|
||||||
List<String> allowedOriginList = new ArrayList<>();
|
|
||||||
|
|
||||||
for (String allowedOrigin : databaseAllowedOriginList) {
|
|
||||||
if (allowedOrigin != null && !allowedOrigin.isBlank()) {
|
|
||||||
allowedOriginList.add(allowedOrigin.trim());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
String allowedOriginJson = objectMapper.writeValueAsString(allowedOriginList);
|
|
||||||
stringRedisTemplate.opsForValue().set(REDIS_KEY, allowedOriginJson);
|
|
||||||
this.allowedOriginList = List.copyOf(allowedOriginList);
|
|
||||||
} catch (JsonProcessingException e) {
|
|
||||||
throw new IllegalStateException("CORS Redis cache JSON creation failed.", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isAllowed(String origin) {
|
|
||||||
return allowedOriginList.contains("*") || allowedOriginList.contains(origin);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<String> getAllowedOriginList() {
|
|
||||||
return List.copyOf(allowedOriginList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.alist.api.core.config.cors;
|
|
||||||
|
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class CorsCachePublisher {
|
|
||||||
public static final String CHANNEL = "alist:cors:allow-origins:changed";
|
|
||||||
|
|
||||||
private final StringRedisTemplate stringRedisTemplate;
|
|
||||||
|
|
||||||
public CorsCachePublisher(StringRedisTemplate stringRedisTemplate) {
|
|
||||||
this.stringRedisTemplate = stringRedisTemplate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void publishReload() {
|
|
||||||
stringRedisTemplate.convertAndSend(CHANNEL, "reload");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
package com.alist.api.core.config.cors;
|
|
||||||
|
|
||||||
public class CorsCacheRefreshEvent {
|
|
||||||
}
|
|
||||||
-22
@@ -1,22 +0,0 @@
|
|||||||
package com.alist.api.core.config.cors;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import org.springframework.transaction.event.TransactionPhase;
|
|
||||||
import org.springframework.transaction.event.TransactionalEventListener;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class CorsCacheRefreshEventListener {
|
|
||||||
private final CorsCache corsCache;
|
|
||||||
private final CorsCachePublisher corsCachePublisher;
|
|
||||||
|
|
||||||
public CorsCacheRefreshEventListener(CorsCache corsCache, CorsCachePublisher corsCachePublisher) {
|
|
||||||
this.corsCache = corsCache;
|
|
||||||
this.corsCachePublisher = corsCachePublisher;
|
|
||||||
}
|
|
||||||
|
|
||||||
@TransactionalEventListener(phase = TransactionPhase.AFTER_COMMIT)
|
|
||||||
public void refreshCorsCache(CorsCacheRefreshEvent corsCacheRefreshEvent) {
|
|
||||||
corsCache.syncFromDatabase();
|
|
||||||
corsCachePublisher.publishReload();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
package com.alist.api.core.config.cors;
|
|
||||||
|
|
||||||
import org.springframework.data.redis.connection.Message;
|
|
||||||
import org.springframework.data.redis.connection.MessageListener;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class CorsCacheSubscriber implements MessageListener {
|
|
||||||
private final CorsCache corsCache;
|
|
||||||
|
|
||||||
public CorsCacheSubscriber(CorsCache corsCache) {
|
|
||||||
this.corsCache = corsCache;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onMessage(Message message, byte[] pattern) {
|
|
||||||
corsCache.refreshFromRedis();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
package com.alist.api.core.config.cors;
|
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
|
||||||
import org.springframework.data.redis.listener.ChannelTopic;
|
|
||||||
import org.springframework.data.redis.listener.RedisMessageListenerContainer;
|
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@EnableScheduling
|
|
||||||
public class CorsRedisConfig {
|
|
||||||
@Bean
|
|
||||||
public RedisMessageListenerContainer corsRedisMessageListenerContainer(RedisConnectionFactory redisConnectionFactory, CorsCacheSubscriber corsCacheSubscriber) {
|
|
||||||
RedisMessageListenerContainer redisMessageListenerContainer = new RedisMessageListenerContainer();
|
|
||||||
redisMessageListenerContainer.setConnectionFactory(redisConnectionFactory);
|
|
||||||
redisMessageListenerContainer.addMessageListener(corsCacheSubscriber, new ChannelTopic(CorsCachePublisher.CHANNEL));
|
|
||||||
|
|
||||||
return redisMessageListenerContainer;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
package com.alist.api.core.config.file;
|
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
@EnableConfigurationProperties(FileUploadProperties.class)
|
|
||||||
public class FileUploadConfig {
|
|
||||||
}
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
package com.alist.api.core.config.file;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
import org.springframework.util.unit.DataSize;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@ConfigurationProperties(prefix = "file.upload")
|
|
||||||
public class FileUploadProperties {
|
|
||||||
private DataSize maxSize;
|
|
||||||
private List<String> allowedExtensions;
|
|
||||||
private Map<String, UploadType> types;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public static class UploadType {
|
|
||||||
private String folder;
|
|
||||||
private DataSize maxSize;
|
|
||||||
private boolean imageOnly;
|
|
||||||
private Resize resize = new Resize();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public static class Resize {
|
|
||||||
private boolean enabled;
|
|
||||||
private Integer width;
|
|
||||||
private Integer height;
|
|
||||||
private Integer maxWidth;
|
|
||||||
private Float quality = 0.9f;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
package com.alist.api.core.config.filter;
|
|
||||||
|
|
||||||
import com.alist.api.core.config.cors.CorsCache;
|
|
||||||
import jakarta.servlet.FilterChain;
|
|
||||||
import jakarta.servlet.ServletException;
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.core.Ordered;
|
|
||||||
import org.springframework.core.annotation.Order;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
import org.springframework.web.filter.OncePerRequestFilter;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
|
||||||
public class DynamicCorsFilter extends OncePerRequestFilter {
|
|
||||||
private final CorsCache corsCache;
|
|
||||||
|
|
||||||
public DynamicCorsFilter(CorsCache corsCache) {
|
|
||||||
this.corsCache = corsCache;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
|
||||||
String origin = request.getHeader("Origin");
|
|
||||||
|
|
||||||
if (origin != null && corsCache.isAllowed(origin)) {
|
|
||||||
response.setHeader("Access-Control-Allow-Origin", origin);
|
|
||||||
response.setHeader("Access-Control-Allow-Credentials", "true");
|
|
||||||
response.setHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, PATCH, OPTIONS");
|
|
||||||
response.setHeader("Access-Control-Allow-Headers", "Content-Type, Authorization, X-Requested-With, Accept, Origin, Referer, Content-Disposition, Content-Length");
|
|
||||||
response.setHeader("Access-Control-Expose-Headers", "Authorization, Set-Cookie");
|
|
||||||
response.setHeader("Access-Control-Max-Age", "3600");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ("OPTIONS".equalsIgnoreCase(request.getMethod())) {
|
|
||||||
response.setStatus(HttpServletResponse.SC_OK);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
filterChain.doFilter(request, response);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.fileDetail.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailTusFileAuthDto {
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
private String fileUuid;
|
|
||||||
private String originName;
|
|
||||||
private Long sizeBytes;
|
|
||||||
private String contentType;
|
|
||||||
}
|
|
||||||
-11
@@ -1,11 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.fileDetail.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailTusFileListDto {
|
|
||||||
private Long fileMasterIdx;
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.fileDetail.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.fileDetail.dto.FileDetailTusFileAuthDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.fileDetail.dto.FileDetailTusFileListDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.fileDetail.dto.FileDetailTusFileViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.fileDetail.vo.FileDetailTusFileListItemVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.fileDetail.vo.FileDetailTusFileViewVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface FileDetailTusFileMapper {
|
|
||||||
int fileDetailTusFileUploadAuthCount(FileDetailTusFileAuthDto fileDetailTusFileAuthDto);
|
|
||||||
|
|
||||||
FileDetailTusFileViewVo fileDetailTusFileMetaView(FileDetailTusFileViewDto fileDetailTusFileViewDto);
|
|
||||||
|
|
||||||
FileDetailTusFileViewVo fileDetailTusFileMoveView(FileDetailTusFileViewDto fileDetailTusFileViewDto);
|
|
||||||
|
|
||||||
FileDetailTusFileViewVo fileDetailTusFileUploadCancelView(FileDetailTusFileViewDto fileDetailTusFileViewDto);
|
|
||||||
|
|
||||||
List<FileDetailTusFileListItemVo> fileDetailTusFileList(FileDetailTusFileListDto fileDetailTusFileListDto);
|
|
||||||
|
|
||||||
FileDetailTusFileViewVo fileDetailTusFileView(FileDetailTusFileViewDto fileDetailTusFileViewDto);
|
|
||||||
|
|
||||||
FileDetailTusFileViewVo fileDetailTusFileDeleteView(FileDetailTusFileViewDto fileDetailTusFileViewDto);
|
|
||||||
}
|
|
||||||
-56
@@ -1,56 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.fileDetail.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.fileDetail.dto.FileDetailTusFileAuthDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.fileDetail.dto.FileDetailTusFileListDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.fileDetail.dto.FileDetailTusFileViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.fileDetail.mapper.FileDetailTusFileMapper;
|
|
||||||
import com.alist.api.core.modules.bespoke.fileDetail.vo.FileDetailTusFileListItemVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.fileDetail.vo.FileDetailTusFileViewVo;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class FileDetailTusFileService {
|
|
||||||
private final FileDetailTusFileMapper fileDetailTusFileMapper;
|
|
||||||
|
|
||||||
public FileDetailTusFileService(FileDetailTusFileMapper fileDetailTusFileMapper) {
|
|
||||||
this.fileDetailTusFileMapper = fileDetailTusFileMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public int fileDetailTusFileUploadAuthCount(FileDetailTusFileAuthDto fileDetailTusFileAuthDto) {
|
|
||||||
return fileDetailTusFileMapper.fileDetailTusFileUploadAuthCount(fileDetailTusFileAuthDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public FileDetailTusFileViewVo fileDetailTusFileMetaView(FileDetailTusFileViewDto fileDetailTusFileViewDto) {
|
|
||||||
return fileDetailTusFileMapper.fileDetailTusFileMetaView(fileDetailTusFileViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public FileDetailTusFileViewVo fileDetailTusFileMoveView(FileDetailTusFileViewDto fileDetailTusFileViewDto) {
|
|
||||||
return fileDetailTusFileMapper.fileDetailTusFileMoveView(fileDetailTusFileViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public FileDetailTusFileViewVo fileDetailTusFileUploadCancelView(FileDetailTusFileViewDto fileDetailTusFileViewDto) {
|
|
||||||
return fileDetailTusFileMapper.fileDetailTusFileUploadCancelView(fileDetailTusFileViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public List<FileDetailTusFileListItemVo> fileDetailTusFileList(FileDetailTusFileListDto fileDetailTusFileListDto) {
|
|
||||||
return fileDetailTusFileMapper.fileDetailTusFileList(fileDetailTusFileListDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public FileDetailTusFileViewVo fileDetailTusFileView(FileDetailTusFileViewDto fileDetailTusFileViewDto) {
|
|
||||||
return fileDetailTusFileMapper.fileDetailTusFileView(fileDetailTusFileViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public FileDetailTusFileViewVo fileDetailTusFileDeleteView(FileDetailTusFileViewDto fileDetailTusFileViewDto) {
|
|
||||||
return fileDetailTusFileMapper.fileDetailTusFileDeleteView(fileDetailTusFileViewDto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.fileDetail.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailTusFileListItemVo {
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
private Long fileMasterIdx;
|
|
||||||
private String fileUuid;
|
|
||||||
private String originName;
|
|
||||||
private String contentType;
|
|
||||||
private Long sizeBytes;
|
|
||||||
}
|
|
||||||
-25
@@ -1,25 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.fileDetail.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailTusFileViewVo {
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
private Long fileMasterIdx;
|
|
||||||
private String fileUuid;
|
|
||||||
private String originName;
|
|
||||||
private String contentType;
|
|
||||||
private Long sizeBytes;
|
|
||||||
private Long uploadedBytes;
|
|
||||||
private String tusUploadId;
|
|
||||||
private String folderPath;
|
|
||||||
private String saveName;
|
|
||||||
private String savePath;
|
|
||||||
private String ext;
|
|
||||||
private String moveYn;
|
|
||||||
private Integer moveTryCount;
|
|
||||||
private Integer status;
|
|
||||||
private Integer userIdx;
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.fileMaster.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileMasterTusFileModifyDto {
|
|
||||||
private String fileUuid;
|
|
||||||
}
|
|
||||||
-9
@@ -1,9 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.fileMaster.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.fileMaster.dto.FileMasterTusFileModifyDto;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface FileMasterTusFileMapper {
|
|
||||||
int fileMasterTusFileAggregateModify(FileMasterTusFileModifyDto fileMasterTusFileModifyDto);
|
|
||||||
}
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.fileMaster.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.fileMaster.dto.FileMasterTusFileModifyDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.fileMaster.mapper.FileMasterTusFileMapper;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class FileMasterTusFileService {
|
|
||||||
private final FileMasterTusFileMapper fileMasterTusFileMapper;
|
|
||||||
|
|
||||||
public FileMasterTusFileService(FileMasterTusFileMapper fileMasterTusFileMapper) {
|
|
||||||
this.fileMasterTusFileMapper = fileMasterTusFileMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public int fileMasterTusFileAggregateModify(FileMasterTusFileModifyDto fileMasterTusFileModifyDto) {
|
|
||||||
return fileMasterTusFileMapper.fileMasterTusFileAggregateModify(fileMasterTusFileModifyDto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.notice.dto;
|
|
||||||
|
|
||||||
import com.alist.api.core.common.paging.PagingRequest;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class NoticeNoticeListDto extends PagingRequest {
|
|
||||||
private String keyword;
|
|
||||||
private String noticeType;
|
|
||||||
private String targetScope;
|
|
||||||
private Long campusIdx;
|
|
||||||
private String pinYn;
|
|
||||||
private String useYn;
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.notice.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class NoticeNoticeViewDto {
|
|
||||||
private Long noticeIdx;
|
|
||||||
}
|
|
||||||
-23
@@ -1,23 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.notice.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.dto.NoticeNoticeListDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.dto.NoticeNoticeViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.vo.NoticeNoticeCampusListItemVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.vo.NoticeNoticeFileListItemVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.vo.NoticeNoticeListItemVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.vo.NoticeNoticeViewVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface NoticeNoticeMapper {
|
|
||||||
int noticeNoticeListCount(NoticeNoticeListDto noticeNoticeListDto);
|
|
||||||
|
|
||||||
List<NoticeNoticeListItemVo> noticeNoticeList(NoticeNoticeListDto noticeNoticeListDto);
|
|
||||||
|
|
||||||
NoticeNoticeViewVo noticeNoticeView(NoticeNoticeViewDto noticeNoticeViewDto);
|
|
||||||
|
|
||||||
List<NoticeNoticeCampusListItemVo> noticeNoticeCampusList(NoticeNoticeViewDto noticeNoticeViewDto);
|
|
||||||
|
|
||||||
List<NoticeNoticeFileListItemVo> noticeNoticeFileList(NoticeNoticeViewDto noticeNoticeViewDto);
|
|
||||||
}
|
|
||||||
-46
@@ -1,46 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.notice.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.dto.NoticeNoticeListDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.dto.NoticeNoticeViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.mapper.NoticeNoticeMapper;
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.vo.NoticeNoticeCampusListItemVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.vo.NoticeNoticeFileListItemVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.vo.NoticeNoticeListItemVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.notice.vo.NoticeNoticeViewVo;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class NoticeNoticeService {
|
|
||||||
private final NoticeNoticeMapper noticeNoticeMapper;
|
|
||||||
|
|
||||||
public NoticeNoticeService(NoticeNoticeMapper noticeNoticeMapper) {
|
|
||||||
this.noticeNoticeMapper = noticeNoticeMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public int noticeNoticeListCount(NoticeNoticeListDto noticeNoticeListDto) {
|
|
||||||
return noticeNoticeMapper.noticeNoticeListCount(noticeNoticeListDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public List<NoticeNoticeListItemVo> noticeNoticeList(NoticeNoticeListDto noticeNoticeListDto) {
|
|
||||||
return noticeNoticeMapper.noticeNoticeList(noticeNoticeListDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public NoticeNoticeViewVo noticeNoticeView(NoticeNoticeViewDto noticeNoticeViewDto) {
|
|
||||||
return noticeNoticeMapper.noticeNoticeView(noticeNoticeViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public List<NoticeNoticeCampusListItemVo> noticeNoticeCampusList(NoticeNoticeViewDto noticeNoticeViewDto) {
|
|
||||||
return noticeNoticeMapper.noticeNoticeCampusList(noticeNoticeViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public List<NoticeNoticeFileListItemVo> noticeNoticeFileList(NoticeNoticeViewDto noticeNoticeViewDto) {
|
|
||||||
return noticeNoticeMapper.noticeNoticeFileList(noticeNoticeViewDto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-11
@@ -1,11 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.notice.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class NoticeNoticeCampusListItemVo {
|
|
||||||
private Long noticeCampusIdx;
|
|
||||||
private Long campusIdx;
|
|
||||||
}
|
|
||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.notice.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class NoticeNoticeFileListItemVo {
|
|
||||||
private Long noticeFileIdx;
|
|
||||||
private Long noticeIdx;
|
|
||||||
private String fileOriginalName;
|
|
||||||
private String fileSaveName;
|
|
||||||
private String filePath;
|
|
||||||
private Long fileSize;
|
|
||||||
private String fileExt;
|
|
||||||
private Integer sortOrder;
|
|
||||||
private LocalDateTime createDate;
|
|
||||||
}
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.notice.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class NoticeNoticeListItemVo {
|
|
||||||
private Long noticeIdx;
|
|
||||||
private String noticeType;
|
|
||||||
private String targetScope;
|
|
||||||
private String title;
|
|
||||||
private String pinYn;
|
|
||||||
private LocalDateTime startDate;
|
|
||||||
private LocalDateTime endDate;
|
|
||||||
private Integer viewCount;
|
|
||||||
private String useYn;
|
|
||||||
private LocalDateTime createDate;
|
|
||||||
private LocalDateTime updateDate;
|
|
||||||
}
|
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.notice.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class NoticeNoticeViewVo {
|
|
||||||
private Long noticeIdx;
|
|
||||||
private String noticeType;
|
|
||||||
private String targetScope;
|
|
||||||
private String title;
|
|
||||||
private String content;
|
|
||||||
private String pinYn;
|
|
||||||
private LocalDateTime startDate;
|
|
||||||
private LocalDateTime endDate;
|
|
||||||
private Integer viewCount;
|
|
||||||
private String useYn;
|
|
||||||
private LocalDateTime createDate;
|
|
||||||
private Long createMember;
|
|
||||||
private LocalDateTime updateDate;
|
|
||||||
private Long updateMember;
|
|
||||||
}
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.dto;
|
|
||||||
|
|
||||||
import com.alist.api.core.common.paging.PagingRequest;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserAdminMemberListDto extends PagingRequest {
|
|
||||||
private String keyword;
|
|
||||||
private String userRole;
|
|
||||||
private String userType;
|
|
||||||
private String dormantYn;
|
|
||||||
private String withdrawStatus;
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserAdminMemberViewDto {
|
|
||||||
private Integer userIdx;
|
|
||||||
}
|
|
||||||
-11
@@ -1,11 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserLoginViewDto {
|
|
||||||
private String id;
|
|
||||||
private String userType;
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserSsoLoginViewDto {
|
|
||||||
private String id;
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserUserPasswordViewDto {
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserUserProfileViewDto {
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
}
|
|
||||||
-18
@@ -1,18 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserAdminMemberListDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserAdminMemberViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserAdminMemberListItemVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserAdminMemberViewVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface TestUserAdminMemberMapper {
|
|
||||||
int testUserAdminMemberCount(TestUserAdminMemberListDto testUserAdminMemberListDto);
|
|
||||||
|
|
||||||
List<TestUserAdminMemberListItemVo> testUserAdminMemberList(TestUserAdminMemberListDto testUserAdminMemberListDto);
|
|
||||||
|
|
||||||
TestUserAdminMemberViewVo testUserAdminMemberView(TestUserAdminMemberViewDto testUserAdminMemberViewDto);
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserLoginViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserLoginViewVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface TestUserAuthMapper {
|
|
||||||
TestUserLoginViewVo testUserLoginView(TestUserLoginViewDto testUserLoginViewDto);
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserSsoLoginViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserSsoLoginViewVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface TestUserSsoMapper {
|
|
||||||
TestUserSsoLoginViewVo testUserSsoLoginView(TestUserSsoLoginViewDto testUserSsoLoginViewDto);
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserUserPasswordViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserUserProfileViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserUserPasswordViewVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserUserProfileViewVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface TestUserUserMapper {
|
|
||||||
TestUserUserPasswordViewVo testUserUserPasswordView(TestUserUserPasswordViewDto testUserUserPasswordViewDto);
|
|
||||||
|
|
||||||
TestUserUserProfileViewVo testUserUserProfileView(TestUserUserProfileViewDto testUserUserProfileViewDto);
|
|
||||||
}
|
|
||||||
-34
@@ -1,34 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserAdminMemberListDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserAdminMemberViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.mapper.TestUserAdminMemberMapper;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserAdminMemberListItemVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserAdminMemberViewVo;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
@Service
|
|
||||||
public class TestUserAdminMemberService {
|
|
||||||
private final TestUserAdminMemberMapper testUserBackOfficeMapper;
|
|
||||||
|
|
||||||
public TestUserAdminMemberService(TestUserAdminMemberMapper testUserBackOfficeMapper) {
|
|
||||||
this.testUserBackOfficeMapper = testUserBackOfficeMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public int testUserAdminMemberCount(TestUserAdminMemberListDto testUserAdminMemberListDto) {
|
|
||||||
return testUserBackOfficeMapper.testUserAdminMemberCount(testUserAdminMemberListDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public List<TestUserAdminMemberListItemVo> testUserAdminMemberList(TestUserAdminMemberListDto testUserAdminMemberListDto) {
|
|
||||||
return testUserBackOfficeMapper.testUserAdminMemberList(testUserAdminMemberListDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public TestUserAdminMemberViewVo testUserAdminMemberView(TestUserAdminMemberViewDto testUserAdminMemberViewDto) {
|
|
||||||
return testUserBackOfficeMapper.testUserAdminMemberView(testUserAdminMemberViewDto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserLoginViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.mapper.TestUserAuthMapper;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserLoginViewVo;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class TestUserAuthService {
|
|
||||||
private final TestUserAuthMapper testUserAuthMapper;
|
|
||||||
|
|
||||||
public TestUserAuthService(TestUserAuthMapper testUserAuthMapper) {
|
|
||||||
this.testUserAuthMapper = testUserAuthMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public TestUserLoginViewVo testUserLoginView(TestUserLoginViewDto testUserLoginViewDto) {
|
|
||||||
return testUserAuthMapper.testUserLoginView(testUserLoginViewDto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-21
@@ -1,21 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserSsoLoginViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.mapper.TestUserSsoMapper;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserSsoLoginViewVo;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class TestUserSsoService {
|
|
||||||
private final TestUserSsoMapper testUserSsoMapper;
|
|
||||||
|
|
||||||
public TestUserSsoService(TestUserSsoMapper testUserSsoMapper) {
|
|
||||||
this.testUserSsoMapper = testUserSsoMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public TestUserSsoLoginViewVo testUserSsoLoginView(TestUserSsoLoginViewDto testUserSsoLoginViewDto) {
|
|
||||||
return testUserSsoMapper.testUserSsoLoginView(testUserSsoLoginViewDto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserUserPasswordViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.dto.TestUserUserProfileViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.mapper.TestUserUserMapper;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserUserPasswordViewVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUser.vo.TestUserUserProfileViewVo;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class TestUserUserService {
|
|
||||||
private final TestUserUserMapper testUserUserMapper;
|
|
||||||
|
|
||||||
public TestUserUserService(TestUserUserMapper testUserUserMapper) {
|
|
||||||
this.testUserUserMapper = testUserUserMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public TestUserUserPasswordViewVo testUserUserPasswordView(TestUserUserPasswordViewDto testUserUserPasswordViewDto) {
|
|
||||||
return testUserUserMapper.testUserUserPasswordView(testUserUserPasswordViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public TestUserUserProfileViewVo testUserUserProfileView(TestUserUserProfileViewDto testUserUserProfileViewDto) {
|
|
||||||
return testUserUserMapper.testUserUserProfileView(testUserUserProfileViewDto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-24
@@ -1,24 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserAdminMemberListItemVo {
|
|
||||||
private Integer userIdx;
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
private String id;
|
|
||||||
private String email;
|
|
||||||
private String hp;
|
|
||||||
private String userRole;
|
|
||||||
private String userType;
|
|
||||||
private String dormantYn;
|
|
||||||
private LocalDateTime dormantAt;
|
|
||||||
private String withdrawStatus;
|
|
||||||
private LocalDateTime withdrawAt;
|
|
||||||
private LocalDateTime createAt;
|
|
||||||
private LocalDateTime updateAt;
|
|
||||||
}
|
|
||||||
-4
@@ -1,4 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.vo;
|
|
||||||
|
|
||||||
public class TestUserAdminMemberViewVo extends TestUserAdminMemberListItemVo {
|
|
||||||
}
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserLoginViewVo {
|
|
||||||
private Integer userIdx;
|
|
||||||
private String id;
|
|
||||||
private String password;
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
private String userRole;
|
|
||||||
private String userType;
|
|
||||||
}
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserSsoLoginViewVo {
|
|
||||||
private Integer userIdx;
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
private String id;
|
|
||||||
private String password;
|
|
||||||
private String userRole;
|
|
||||||
private String userType;
|
|
||||||
}
|
|
||||||
-11
@@ -1,11 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserUserPasswordViewVo {
|
|
||||||
private Integer userIdx;
|
|
||||||
private String password;
|
|
||||||
}
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUser.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserUserProfileViewVo {
|
|
||||||
private Integer userIdx;
|
|
||||||
private String id;
|
|
||||||
private String email;
|
|
||||||
private String hp;
|
|
||||||
private String userRole;
|
|
||||||
private String userType;
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUserToken.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserTokenApiKeyLoginViewDto {
|
|
||||||
private String userApiKey;
|
|
||||||
private String userType;
|
|
||||||
private List<String> userTypes;
|
|
||||||
}
|
|
||||||
-11
@@ -1,11 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUserToken.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserTokenLoginCheckedViewDto {
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
private String userType;
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUserToken.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserTokenRefreshViewDto {
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
private String userType;
|
|
||||||
private List<String> userTypes;
|
|
||||||
}
|
|
||||||
-18
@@ -1,18 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUserToken.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.dto.TestUserTokenApiKeyLoginViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.dto.TestUserTokenLoginCheckedViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.dto.TestUserTokenRefreshViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.vo.TestUserTokenApiKeyLoginViewVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.vo.TestUserTokenLoginCheckedViewVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.vo.TestUserTokenRefreshViewVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface TestUserTokenAuthMapper {
|
|
||||||
TestUserTokenApiKeyLoginViewVo testUserTokenApiKeyLoginView(TestUserTokenApiKeyLoginViewDto testUserTokenApiKeyLoginViewDto);
|
|
||||||
|
|
||||||
TestUserTokenLoginCheckedViewVo testUserTokenLoginCheckedView(TestUserTokenLoginCheckedViewDto testUserTokenLoginCheckedViewDto);
|
|
||||||
|
|
||||||
TestUserTokenRefreshViewVo testUserTokenRefreshView(TestUserTokenRefreshViewDto testUserTokenRefreshViewDto);
|
|
||||||
}
|
|
||||||
-35
@@ -1,35 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUserToken.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.dto.TestUserTokenApiKeyLoginViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.dto.TestUserTokenLoginCheckedViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.dto.TestUserTokenRefreshViewDto;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.mapper.TestUserTokenAuthMapper;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.vo.TestUserTokenApiKeyLoginViewVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.vo.TestUserTokenLoginCheckedViewVo;
|
|
||||||
import com.alist.api.core.modules.bespoke.testUserToken.vo.TestUserTokenRefreshViewVo;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class TestUserTokenAuthService {
|
|
||||||
private final TestUserTokenAuthMapper testUserTokenAuthMapper;
|
|
||||||
|
|
||||||
public TestUserTokenAuthService(TestUserTokenAuthMapper testUserTokenAuthMapper) {
|
|
||||||
this.testUserTokenAuthMapper = testUserTokenAuthMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public TestUserTokenApiKeyLoginViewVo testUserTokenApiKeyLoginView(TestUserTokenApiKeyLoginViewDto testUserTokenApiKeyLoginViewDto) {
|
|
||||||
return testUserTokenAuthMapper.testUserTokenApiKeyLoginView(testUserTokenApiKeyLoginViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public TestUserTokenLoginCheckedViewVo testUserTokenLoginCheckedView(TestUserTokenLoginCheckedViewDto testUserTokenLoginCheckedViewDto) {
|
|
||||||
return testUserTokenAuthMapper.testUserTokenLoginCheckedView(testUserTokenLoginCheckedViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public TestUserTokenRefreshViewVo testUserTokenRefreshView(TestUserTokenRefreshViewDto testUserTokenRefreshViewDto) {
|
|
||||||
return testUserTokenAuthMapper.testUserTokenRefreshView(testUserTokenRefreshViewDto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUserToken.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserTokenApiKeyLoginViewVo {
|
|
||||||
private Integer userIdx;
|
|
||||||
private String id;
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
private String userRole;
|
|
||||||
private String userType;
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUserToken.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserTokenLoginCheckedViewVo {
|
|
||||||
private Integer userIdx;
|
|
||||||
private String id;
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
private String userRole;
|
|
||||||
private String userType;
|
|
||||||
}
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
package com.alist.api.core.modules.bespoke.testUserToken.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class TestUserTokenRefreshViewVo {
|
|
||||||
private Integer userIdx;
|
|
||||||
private String id;
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
private String refreshToken;
|
|
||||||
private String userRole;
|
|
||||||
private String userType;
|
|
||||||
}
|
|
||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
package com.alist.api.core.modules.migration.alist.user.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.migration.alist.user.dto.AlistUserMigrationDto;
|
|
||||||
import com.alist.api.core.modules.migration.alist.user.vo.AlistUserMigrationVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface AlistUserMigrationMapper {
|
|
||||||
List<AlistUserMigrationVo> selectAlistUserMigrationList(AlistUserMigrationDto alistUserMigrationDto);
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
package com.alist.api.core.modules.migration.alist.user.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.migration.alist.user.dto.AlistUserMigrationDto;
|
|
||||||
import com.alist.api.core.modules.migration.alist.user.mapper.AlistUserMigrationMapper;
|
|
||||||
import com.alist.api.core.modules.migration.alist.user.vo.AlistUserMigrationVo;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@ConditionalOnProperty(
|
|
||||||
prefix = "migration.datasource.alist",
|
|
||||||
name = "enabled",
|
|
||||||
havingValue = "true"
|
|
||||||
)
|
|
||||||
public class AlistUserMigrationService {
|
|
||||||
private final AlistUserMigrationMapper alistUserMigrationMapper;
|
|
||||||
|
|
||||||
public AlistUserMigrationService(AlistUserMigrationMapper alistUserMigrationMapper) {
|
|
||||||
this.alistUserMigrationMapper = alistUserMigrationMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<AlistUserMigrationVo> selectAlistUserMigrationList(AlistUserMigrationDto alistUserMigrationDto) {
|
|
||||||
return alistUserMigrationMapper.selectAlistUserMigrationList(alistUserMigrationDto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-12
@@ -1,12 +0,0 @@
|
|||||||
package com.alist.api.core.modules.migration.eltown.user.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.migration.eltown.user.dto.EltownUserMigrationDto;
|
|
||||||
import com.alist.api.core.modules.migration.eltown.user.vo.EltownUserMigrationVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface EltownUserMigrationMapper {
|
|
||||||
List<EltownUserMigrationVo> selectEltownUserMigrationList(EltownUserMigrationDto eltownUserMigrationDto);
|
|
||||||
}
|
|
||||||
-30
@@ -1,30 +0,0 @@
|
|||||||
package com.alist.api.core.modules.migration.eltown.user.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.common.utils.HashUtils;
|
|
||||||
import com.alist.api.core.modules.migration.eltown.user.dto.EltownUserMigrationDto;
|
|
||||||
import com.alist.api.core.modules.migration.eltown.user.mapper.EltownUserMigrationMapper;
|
|
||||||
import com.alist.api.core.modules.migration.eltown.user.vo.EltownUserMigrationVo;
|
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
@ConditionalOnProperty(
|
|
||||||
prefix = "migration.datasource.eltown",
|
|
||||||
name = "enabled",
|
|
||||||
havingValue = "true"
|
|
||||||
)
|
|
||||||
public class EltownUserMigrationService {
|
|
||||||
private final EltownUserMigrationMapper eltownUserMigrationMapper;
|
|
||||||
|
|
||||||
public EltownUserMigrationService(EltownUserMigrationMapper eltownUserMigrationMapper) {
|
|
||||||
this.eltownUserMigrationMapper = eltownUserMigrationMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<EltownUserMigrationVo> selectEltownUserMigrationList(EltownUserMigrationDto eltownUserMigrationDto) {
|
|
||||||
eltownUserMigrationDto.setMd5Password(HashUtils.md5(eltownUserMigrationDto.getPassword()));
|
|
||||||
|
|
||||||
return eltownUserMigrationMapper.selectEltownUserMigrationList(eltownUserMigrationDto);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AlCalendarAddDto {
|
|
||||||
private String yyyymmdd;
|
|
||||||
private String yyyy;
|
|
||||||
private String mm;
|
|
||||||
private String dd;
|
|
||||||
private Short weekNo;
|
|
||||||
private String weekNm;
|
|
||||||
private String holidayYn;
|
|
||||||
private String holidayNm;
|
|
||||||
private LocalDate formatDate;
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AlCalendarDeleteDto {
|
|
||||||
private String yyyymmdd;
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.dto;
|
|
||||||
|
|
||||||
import com.alist.api.core.common.paging.PagingRequest;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AlCalendarListDto extends PagingRequest {
|
|
||||||
private String yyyymmdd;
|
|
||||||
private String yyyy;
|
|
||||||
private String mm;
|
|
||||||
private String holidayYn;
|
|
||||||
}
|
|
||||||
-31
@@ -1,31 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AlCalendarModifyDto {
|
|
||||||
private String yyyymmdd;
|
|
||||||
private String yyyy;
|
|
||||||
private String mm;
|
|
||||||
private String dd;
|
|
||||||
private Short weekNo;
|
|
||||||
private String weekNm;
|
|
||||||
private String holidayYn;
|
|
||||||
private String holidayNm;
|
|
||||||
private LocalDate formatDate;
|
|
||||||
|
|
||||||
public boolean hasModifyValue() {
|
|
||||||
return yyyy != null
|
|
||||||
|| mm != null
|
|
||||||
|| dd != null
|
|
||||||
|| weekNo != null
|
|
||||||
|| weekNm != null
|
|
||||||
|| holidayYn != null
|
|
||||||
|| holidayNm != null
|
|
||||||
|| formatDate != null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AlCalendarViewDto {
|
|
||||||
private String yyyymmdd;
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.dto.AlCalendarAddDto;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.dto.AlCalendarDeleteDto;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.dto.AlCalendarListDto;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.dto.AlCalendarModifyDto;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.dto.AlCalendarViewDto;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.vo.AlCalendarListItemVo;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.vo.AlCalendarViewVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface AlCalendarMapper {
|
|
||||||
int selectAlCalendarListCount(AlCalendarListDto alCalendarListDto);
|
|
||||||
|
|
||||||
List<AlCalendarListItemVo> selectAlCalendarList(AlCalendarListDto alCalendarListDto);
|
|
||||||
|
|
||||||
AlCalendarViewVo selectAlCalendarView(AlCalendarViewDto alCalendarViewDto);
|
|
||||||
|
|
||||||
int insertAlCalendarAdd(AlCalendarAddDto alCalendarAddDto);
|
|
||||||
|
|
||||||
int updateAlCalendarModify(AlCalendarModifyDto alCalendarModifyDto);
|
|
||||||
|
|
||||||
int deleteAlCalendarDelete(AlCalendarDeleteDto alCalendarDeleteDto);
|
|
||||||
}
|
|
||||||
-82
@@ -1,82 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.dto.AlCalendarAddDto;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.dto.AlCalendarDeleteDto;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.dto.AlCalendarListDto;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.dto.AlCalendarModifyDto;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.dto.AlCalendarViewDto;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.mapper.AlCalendarMapper;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.vo.AlCalendarAddVo;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.vo.AlCalendarDeleteVo;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.vo.AlCalendarListVo;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.vo.AlCalendarModifyVo;
|
|
||||||
import com.alist.api.core.modules.standard.alCalendar.vo.AlCalendarViewVo;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class AlCalendarService {
|
|
||||||
private final AlCalendarMapper alCalendarMapper;
|
|
||||||
|
|
||||||
public AlCalendarService(AlCalendarMapper alCalendarMapper) {
|
|
||||||
this.alCalendarMapper = alCalendarMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public AlCalendarListVo selectAlCalendarList(AlCalendarListDto alCalendarListDto) {
|
|
||||||
int totalCount = alCalendarMapper.selectAlCalendarListCount(alCalendarListDto);
|
|
||||||
|
|
||||||
AlCalendarListVo alCalendarListVo = new AlCalendarListVo();
|
|
||||||
alCalendarListVo.setAlCalendarList(alCalendarMapper.selectAlCalendarList(alCalendarListDto));
|
|
||||||
alCalendarListVo.setPaging(alCalendarListDto, totalCount);
|
|
||||||
|
|
||||||
return alCalendarListVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public AlCalendarViewVo selectAlCalendarView(AlCalendarViewDto alCalendarViewDto) {
|
|
||||||
return alCalendarMapper.selectAlCalendarView(alCalendarViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public AlCalendarAddVo insertAlCalendarAdd(AlCalendarAddDto alCalendarAddDto) {
|
|
||||||
int insertCount = alCalendarMapper.insertAlCalendarAdd(alCalendarAddDto);
|
|
||||||
|
|
||||||
AlCalendarAddVo alCalendarAddVo = new AlCalendarAddVo();
|
|
||||||
alCalendarAddVo.setAdded(insertCount > 0);
|
|
||||||
alCalendarAddVo.setYyyymmdd(alCalendarAddDto.getYyyymmdd());
|
|
||||||
alCalendarAddVo.setResultCode(insertCount > 0 ? 2002 : 500);
|
|
||||||
|
|
||||||
return alCalendarAddVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public AlCalendarModifyVo updateAlCalendarModify(AlCalendarModifyDto alCalendarModifyDto) {
|
|
||||||
AlCalendarModifyVo alCalendarModifyVo = new AlCalendarModifyVo();
|
|
||||||
alCalendarModifyVo.setYyyymmdd(alCalendarModifyDto.getYyyymmdd());
|
|
||||||
|
|
||||||
if (!alCalendarModifyDto.hasModifyValue()) {
|
|
||||||
alCalendarModifyVo.setUpdated(false);
|
|
||||||
alCalendarModifyVo.setResultCode(4001);
|
|
||||||
return alCalendarModifyVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
int updateCount = alCalendarMapper.updateAlCalendarModify(alCalendarModifyDto);
|
|
||||||
alCalendarModifyVo.setUpdated(updateCount > 0);
|
|
||||||
alCalendarModifyVo.setResultCode(updateCount > 0 ? 2005 : 2003);
|
|
||||||
|
|
||||||
return alCalendarModifyVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public AlCalendarDeleteVo deleteAlCalendarDelete(AlCalendarDeleteDto alCalendarDeleteDto) {
|
|
||||||
int deleteCount = alCalendarMapper.deleteAlCalendarDelete(alCalendarDeleteDto);
|
|
||||||
|
|
||||||
AlCalendarDeleteVo alCalendarDeleteVo = new AlCalendarDeleteVo();
|
|
||||||
alCalendarDeleteVo.setDeleted(deleteCount > 0);
|
|
||||||
alCalendarDeleteVo.setYyyymmdd(alCalendarDeleteDto.getYyyymmdd());
|
|
||||||
alCalendarDeleteVo.setResultCode(deleteCount > 0 ? 2005 : 2003);
|
|
||||||
|
|
||||||
return alCalendarDeleteVo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AlCalendarAddVo {
|
|
||||||
private boolean added;
|
|
||||||
private String yyyymmdd;
|
|
||||||
@JsonIgnore
|
|
||||||
private Integer resultCode;
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AlCalendarDeleteVo {
|
|
||||||
private boolean deleted;
|
|
||||||
private String yyyymmdd;
|
|
||||||
@JsonIgnore
|
|
||||||
private Integer resultCode;
|
|
||||||
}
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AlCalendarListItemVo {
|
|
||||||
private String yyyymmdd;
|
|
||||||
private String yyyy;
|
|
||||||
private String mm;
|
|
||||||
private String dd;
|
|
||||||
private Short weekNo;
|
|
||||||
private String weekNm;
|
|
||||||
private String holidayYn;
|
|
||||||
private String holidayNm;
|
|
||||||
private LocalDate formatDate;
|
|
||||||
}
|
|
||||||
-13
@@ -1,13 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.vo;
|
|
||||||
|
|
||||||
import com.alist.api.core.common.paging.PagingResponse;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AlCalendarListVo extends PagingResponse {
|
|
||||||
private List<AlCalendarListItemVo> alCalendarList;
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AlCalendarModifyVo {
|
|
||||||
private boolean updated;
|
|
||||||
private String yyyymmdd;
|
|
||||||
@JsonIgnore
|
|
||||||
private Integer resultCode;
|
|
||||||
}
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.alCalendar.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.time.LocalDate;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AlCalendarViewVo {
|
|
||||||
private String yyyymmdd;
|
|
||||||
private String yyyy;
|
|
||||||
private String mm;
|
|
||||||
private String dd;
|
|
||||||
private Short weekNo;
|
|
||||||
private String weekNm;
|
|
||||||
private String holidayYn;
|
|
||||||
private String holidayNm;
|
|
||||||
private LocalDate formatDate;
|
|
||||||
}
|
|
||||||
-35
@@ -1,35 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailAddDto {
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
private Long fileMasterIdx;
|
|
||||||
private Integer fileSeq;
|
|
||||||
private String fileUuid;
|
|
||||||
private String itemKey;
|
|
||||||
private String originName;
|
|
||||||
private String saveName;
|
|
||||||
private String savePath;
|
|
||||||
private String contentType;
|
|
||||||
private String ext;
|
|
||||||
private Long sizeBytes;
|
|
||||||
private Long uploadedBytes;
|
|
||||||
private String tusUploadId;
|
|
||||||
private LocalDateTime uploadTokenExpireAt;
|
|
||||||
private String checksumSha256;
|
|
||||||
private String moveYn;
|
|
||||||
private Integer moveTryCount;
|
|
||||||
private String moveLastError;
|
|
||||||
private LocalDateTime moveLockAt;
|
|
||||||
private LocalDateTime moveDate;
|
|
||||||
private String moveLockOwner;
|
|
||||||
private Short status;
|
|
||||||
private Integer createMember;
|
|
||||||
private Integer updateMember;
|
|
||||||
}
|
|
||||||
-11
@@ -1,11 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailDeleteDto {
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
private Integer updateMember;
|
|
||||||
}
|
|
||||||
-16
@@ -1,16 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.dto;
|
|
||||||
|
|
||||||
import com.alist.api.core.common.paging.PagingRequest;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailListDto extends PagingRequest {
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
private Long fileMasterIdx;
|
|
||||||
private String fileUuid;
|
|
||||||
private String itemKey;
|
|
||||||
private String moveYn;
|
|
||||||
private Short status;
|
|
||||||
}
|
|
||||||
-54
@@ -1,54 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailModifyDto {
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
private String itemKey;
|
|
||||||
private String originName;
|
|
||||||
private String saveName;
|
|
||||||
private String savePath;
|
|
||||||
private String contentType;
|
|
||||||
private String ext;
|
|
||||||
private Long sizeBytes;
|
|
||||||
private Long uploadedBytes;
|
|
||||||
private String tusUploadId;
|
|
||||||
private LocalDateTime uploadTokenExpireAt;
|
|
||||||
private String checksumSha256;
|
|
||||||
private String moveYn;
|
|
||||||
private Integer moveTryCount;
|
|
||||||
private String moveLastError;
|
|
||||||
private LocalDateTime moveLockAt;
|
|
||||||
private LocalDateTime moveDate;
|
|
||||||
private String moveLockOwner;
|
|
||||||
private boolean moveLockClear;
|
|
||||||
private Short status;
|
|
||||||
private Integer updateMember;
|
|
||||||
|
|
||||||
public boolean hasModifyValue() {
|
|
||||||
return itemKey != null
|
|
||||||
|| originName != null
|
|
||||||
|| saveName != null
|
|
||||||
|| savePath != null
|
|
||||||
|| contentType != null
|
|
||||||
|| ext != null
|
|
||||||
|| sizeBytes != null
|
|
||||||
|| uploadedBytes != null
|
|
||||||
|| tusUploadId != null
|
|
||||||
|| uploadTokenExpireAt != null
|
|
||||||
|| checksumSha256 != null
|
|
||||||
|| moveYn != null
|
|
||||||
|| moveTryCount != null
|
|
||||||
|| moveLastError != null
|
|
||||||
|| moveLockAt != null
|
|
||||||
|| moveDate != null
|
|
||||||
|| moveLockOwner != null
|
|
||||||
|| moveLockClear
|
|
||||||
|| status != null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailViewDto {
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
}
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.standard.fileDetail.dto.*;
|
|
||||||
import com.alist.api.core.modules.standard.fileDetail.vo.*;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface FileDetailMapper {
|
|
||||||
int selectFileDetailListCount(FileDetailListDto fileDetailListDto);
|
|
||||||
List<FileDetailListItemVo> selectFileDetailList(FileDetailListDto fileDetailListDto);
|
|
||||||
FileDetailViewVo selectFileDetailView(FileDetailViewDto fileDetailViewDto);
|
|
||||||
int insertFileDetailAdd(FileDetailAddDto fileDetailAddDto);
|
|
||||||
int updateFileDetailModify(FileDetailModifyDto fileDetailModifyDto);
|
|
||||||
int updateFileDetailDelete(FileDetailDeleteDto fileDetailDeleteDto);
|
|
||||||
}
|
|
||||||
-75
@@ -1,75 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.standard.fileDetail.dto.*;
|
|
||||||
import com.alist.api.core.modules.standard.fileDetail.mapper.FileDetailMapper;
|
|
||||||
import com.alist.api.core.modules.standard.fileDetail.vo.*;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class FileDetailService {
|
|
||||||
private final FileDetailMapper fileDetailMapper;
|
|
||||||
|
|
||||||
public FileDetailService(FileDetailMapper fileDetailMapper) {
|
|
||||||
this.fileDetailMapper = fileDetailMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public FileDetailListVo selectFileDetailList(FileDetailListDto fileDetailListDto) {
|
|
||||||
int totalCount = fileDetailMapper.selectFileDetailListCount(fileDetailListDto);
|
|
||||||
|
|
||||||
FileDetailListVo fileDetailListVo = new FileDetailListVo();
|
|
||||||
fileDetailListVo.setFileDetailList(fileDetailMapper.selectFileDetailList(fileDetailListDto));
|
|
||||||
fileDetailListVo.setPaging(fileDetailListDto, totalCount);
|
|
||||||
|
|
||||||
return fileDetailListVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public FileDetailViewVo selectFileDetailView(FileDetailViewDto fileDetailViewDto) {
|
|
||||||
return fileDetailMapper.selectFileDetailView(fileDetailViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public FileDetailAddVo insertFileDetailAdd(FileDetailAddDto fileDetailAddDto) {
|
|
||||||
int insertCount = fileDetailMapper.insertFileDetailAdd(fileDetailAddDto);
|
|
||||||
|
|
||||||
FileDetailAddVo fileDetailAddVo = new FileDetailAddVo();
|
|
||||||
fileDetailAddVo.setAdded(insertCount > 0);
|
|
||||||
fileDetailAddVo.setFileDetailIdx(fileDetailAddDto.getFileDetailIdx());
|
|
||||||
fileDetailAddVo.setResultCode(insertCount > 0 ? 2002 : 500);
|
|
||||||
|
|
||||||
return fileDetailAddVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public FileDetailModifyVo updateFileDetailModify(FileDetailModifyDto fileDetailModifyDto) {
|
|
||||||
FileDetailModifyVo fileDetailModifyVo = new FileDetailModifyVo();
|
|
||||||
fileDetailModifyVo.setFileDetailIdx(fileDetailModifyDto.getFileDetailIdx());
|
|
||||||
|
|
||||||
if (!fileDetailModifyDto.hasModifyValue()) {
|
|
||||||
fileDetailModifyVo.setUpdated(false);
|
|
||||||
fileDetailModifyVo.setResultCode(4001);
|
|
||||||
return fileDetailModifyVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
int updateCount = fileDetailMapper.updateFileDetailModify(fileDetailModifyDto);
|
|
||||||
|
|
||||||
fileDetailModifyVo.setUpdated(updateCount > 0);
|
|
||||||
fileDetailModifyVo.setResultCode(updateCount > 0 ? 2005 : 2003);
|
|
||||||
|
|
||||||
return fileDetailModifyVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public FileDetailDeleteVo updateFileDetailDelete(FileDetailDeleteDto fileDetailDeleteDto) {
|
|
||||||
int updateCount = fileDetailMapper.updateFileDetailDelete(fileDetailDeleteDto);
|
|
||||||
|
|
||||||
FileDetailDeleteVo fileDetailDeleteVo = new FileDetailDeleteVo();
|
|
||||||
fileDetailDeleteVo.setDeleted(updateCount > 0);
|
|
||||||
fileDetailDeleteVo.setFileDetailIdx(fileDetailDeleteDto.getFileDetailIdx());
|
|
||||||
fileDetailDeleteVo.setResultCode(updateCount > 0 ? 2005 : 2003);
|
|
||||||
|
|
||||||
return fileDetailDeleteVo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailAddVo {
|
|
||||||
private boolean added;
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
@JsonIgnore
|
|
||||||
private Integer resultCode;
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailDeleteVo {
|
|
||||||
private boolean deleted;
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
@JsonIgnore
|
|
||||||
private Integer resultCode;
|
|
||||||
}
|
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailListItemVo {
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
private Long fileMasterIdx;
|
|
||||||
private Integer fileSeq;
|
|
||||||
private String fileUuid;
|
|
||||||
private String itemKey;
|
|
||||||
private String originName;
|
|
||||||
private String saveName;
|
|
||||||
private String contentType;
|
|
||||||
private Long sizeBytes;
|
|
||||||
private Long uploadedBytes;
|
|
||||||
private String moveYn;
|
|
||||||
private Short status;
|
|
||||||
private LocalDateTime moveDate;
|
|
||||||
private LocalDateTime createDate;
|
|
||||||
private LocalDateTime updateDate;
|
|
||||||
}
|
|
||||||
-13
@@ -1,13 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.vo;
|
|
||||||
|
|
||||||
import com.alist.api.core.common.paging.PagingResponse;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailListVo extends PagingResponse {
|
|
||||||
private List<FileDetailListItemVo> fileDetailList;
|
|
||||||
}
|
|
||||||
-14
@@ -1,14 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailModifyVo {
|
|
||||||
private boolean updated;
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
@JsonIgnore
|
|
||||||
private Integer resultCode;
|
|
||||||
}
|
|
||||||
-37
@@ -1,37 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDetail.vo;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDetailViewVo {
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
private Long fileMasterIdx;
|
|
||||||
private Integer fileSeq;
|
|
||||||
private String fileUuid;
|
|
||||||
private String itemKey;
|
|
||||||
private String originName;
|
|
||||||
private String saveName;
|
|
||||||
private String savePath;
|
|
||||||
private String contentType;
|
|
||||||
private String ext;
|
|
||||||
private Long sizeBytes;
|
|
||||||
private Long uploadedBytes;
|
|
||||||
private String tusUploadId;
|
|
||||||
private LocalDateTime uploadTokenExpireAt;
|
|
||||||
private String checksumSha256;
|
|
||||||
private String moveYn;
|
|
||||||
private Integer moveTryCount;
|
|
||||||
private String moveLastError;
|
|
||||||
private LocalDateTime moveLockAt;
|
|
||||||
private LocalDateTime moveDate;
|
|
||||||
private String moveLockOwner;
|
|
||||||
private Short status;
|
|
||||||
private LocalDateTime createDate;
|
|
||||||
private Integer createMember;
|
|
||||||
private LocalDateTime updateDate;
|
|
||||||
private Integer updateMember;
|
|
||||||
}
|
|
||||||
-20
@@ -1,20 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDownloadEventLog.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDownloadEventLogAddDto {
|
|
||||||
private Long fileDownloadEventLogIdx;
|
|
||||||
private Long fileMasterIdx;
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
private String fileUuid;
|
|
||||||
private String eventType;
|
|
||||||
private Integer userIdx;
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
private String clientIp;
|
|
||||||
private String userAgent;
|
|
||||||
private String referer;
|
|
||||||
private Integer createMember;
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDownloadEventLog.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDownloadEventLogDeleteDto {
|
|
||||||
private Long fileDownloadEventLogIdx;
|
|
||||||
}
|
|
||||||
-17
@@ -1,17 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDownloadEventLog.dto;
|
|
||||||
|
|
||||||
import com.alist.api.core.common.paging.PagingRequest;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDownloadEventLogListDto extends PagingRequest {
|
|
||||||
private Long fileDownloadEventLogIdx;
|
|
||||||
private Long fileMasterIdx;
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
private String fileUuid;
|
|
||||||
private String eventType;
|
|
||||||
private Integer userIdx;
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
}
|
|
||||||
-33
@@ -1,33 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDownloadEventLog.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDownloadEventLogModifyDto {
|
|
||||||
private Long fileDownloadEventLogIdx;
|
|
||||||
private Long fileMasterIdx;
|
|
||||||
private Long fileDetailIdx;
|
|
||||||
private String fileUuid;
|
|
||||||
private String eventType;
|
|
||||||
private Integer userIdx;
|
|
||||||
private Integer userTokenIdx;
|
|
||||||
private String clientIp;
|
|
||||||
private String userAgent;
|
|
||||||
private String referer;
|
|
||||||
private Integer createMember;
|
|
||||||
|
|
||||||
public boolean hasModifyValue() {
|
|
||||||
return fileMasterIdx != null
|
|
||||||
|| fileDetailIdx != null
|
|
||||||
|| fileUuid != null
|
|
||||||
|| eventType != null
|
|
||||||
|| userIdx != null
|
|
||||||
|| userTokenIdx != null
|
|
||||||
|| clientIp != null
|
|
||||||
|| userAgent != null
|
|
||||||
|| referer != null
|
|
||||||
|| createMember != null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-10
@@ -1,10 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDownloadEventLog.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class FileDownloadEventLogViewDto {
|
|
||||||
private Long fileDownloadEventLogIdx;
|
|
||||||
}
|
|
||||||
-27
@@ -1,27 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDownloadEventLog.mapper;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.dto.FileDownloadEventLogAddDto;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.dto.FileDownloadEventLogDeleteDto;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.dto.FileDownloadEventLogListDto;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.dto.FileDownloadEventLogModifyDto;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.dto.FileDownloadEventLogViewDto;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.vo.FileDownloadEventLogListItemVo;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.vo.FileDownloadEventLogViewVo;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@Mapper
|
|
||||||
public interface FileDownloadEventLogMapper {
|
|
||||||
int selectFileDownloadEventLogListCount(FileDownloadEventLogListDto fileDownloadEventLogListDto);
|
|
||||||
|
|
||||||
List<FileDownloadEventLogListItemVo> selectFileDownloadEventLogList(FileDownloadEventLogListDto fileDownloadEventLogListDto);
|
|
||||||
|
|
||||||
FileDownloadEventLogViewVo selectFileDownloadEventLogView(FileDownloadEventLogViewDto fileDownloadEventLogViewDto);
|
|
||||||
|
|
||||||
int insertFileDownloadEventLogAdd(FileDownloadEventLogAddDto fileDownloadEventLogAddDto);
|
|
||||||
|
|
||||||
int updateFileDownloadEventLogModify(FileDownloadEventLogModifyDto fileDownloadEventLogModifyDto);
|
|
||||||
|
|
||||||
int updateFileDownloadEventLogDelete(FileDownloadEventLogDeleteDto fileDownloadEventLogDeleteDto);
|
|
||||||
}
|
|
||||||
-82
@@ -1,82 +0,0 @@
|
|||||||
package com.alist.api.core.modules.standard.fileDownloadEventLog.service;
|
|
||||||
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.dto.FileDownloadEventLogAddDto;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.dto.FileDownloadEventLogDeleteDto;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.dto.FileDownloadEventLogListDto;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.dto.FileDownloadEventLogModifyDto;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.dto.FileDownloadEventLogViewDto;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.mapper.FileDownloadEventLogMapper;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.vo.FileDownloadEventLogAddVo;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.vo.FileDownloadEventLogDeleteVo;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.vo.FileDownloadEventLogListVo;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.vo.FileDownloadEventLogModifyVo;
|
|
||||||
import com.alist.api.core.modules.standard.fileDownloadEventLog.vo.FileDownloadEventLogViewVo;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
@Service
|
|
||||||
public class FileDownloadEventLogService {
|
|
||||||
private final FileDownloadEventLogMapper fileDownloadEventLogMapper;
|
|
||||||
|
|
||||||
public FileDownloadEventLogService(FileDownloadEventLogMapper fileDownloadEventLogMapper) {
|
|
||||||
this.fileDownloadEventLogMapper = fileDownloadEventLogMapper;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public FileDownloadEventLogListVo selectFileDownloadEventLogList(FileDownloadEventLogListDto fileDownloadEventLogListDto) {
|
|
||||||
int totalCount = fileDownloadEventLogMapper.selectFileDownloadEventLogListCount(fileDownloadEventLogListDto);
|
|
||||||
|
|
||||||
FileDownloadEventLogListVo fileDownloadEventLogListVo = new FileDownloadEventLogListVo();
|
|
||||||
fileDownloadEventLogListVo.setFileDownloadEventLogList(fileDownloadEventLogMapper.selectFileDownloadEventLogList(fileDownloadEventLogListDto));
|
|
||||||
fileDownloadEventLogListVo.setPaging(fileDownloadEventLogListDto, totalCount);
|
|
||||||
|
|
||||||
return fileDownloadEventLogListVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(readOnly = true)
|
|
||||||
public FileDownloadEventLogViewVo selectFileDownloadEventLogView(FileDownloadEventLogViewDto fileDownloadEventLogViewDto) {
|
|
||||||
return fileDownloadEventLogMapper.selectFileDownloadEventLogView(fileDownloadEventLogViewDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public FileDownloadEventLogAddVo insertFileDownloadEventLogAdd(FileDownloadEventLogAddDto fileDownloadEventLogAddDto) {
|
|
||||||
int insertCount = fileDownloadEventLogMapper.insertFileDownloadEventLogAdd(fileDownloadEventLogAddDto);
|
|
||||||
|
|
||||||
FileDownloadEventLogAddVo fileDownloadEventLogAddVo = new FileDownloadEventLogAddVo();
|
|
||||||
fileDownloadEventLogAddVo.setAdded(insertCount > 0);
|
|
||||||
fileDownloadEventLogAddVo.setFileDownloadEventLogIdx(fileDownloadEventLogAddDto.getFileDownloadEventLogIdx());
|
|
||||||
fileDownloadEventLogAddVo.setResultCode(insertCount > 0 ? 2002 : 500);
|
|
||||||
|
|
||||||
return fileDownloadEventLogAddVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public FileDownloadEventLogModifyVo updateFileDownloadEventLogModify(FileDownloadEventLogModifyDto fileDownloadEventLogModifyDto) {
|
|
||||||
FileDownloadEventLogModifyVo fileDownloadEventLogModifyVo = new FileDownloadEventLogModifyVo();
|
|
||||||
fileDownloadEventLogModifyVo.setFileDownloadEventLogIdx(fileDownloadEventLogModifyDto.getFileDownloadEventLogIdx());
|
|
||||||
|
|
||||||
if (!fileDownloadEventLogModifyDto.hasModifyValue()) {
|
|
||||||
fileDownloadEventLogModifyVo.setUpdated(false);
|
|
||||||
fileDownloadEventLogModifyVo.setResultCode(4001);
|
|
||||||
return fileDownloadEventLogModifyVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
int updateCount = fileDownloadEventLogMapper.updateFileDownloadEventLogModify(fileDownloadEventLogModifyDto);
|
|
||||||
fileDownloadEventLogModifyVo.setUpdated(updateCount > 0);
|
|
||||||
fileDownloadEventLogModifyVo.setResultCode(updateCount > 0 ? 2005 : 2003);
|
|
||||||
|
|
||||||
return fileDownloadEventLogModifyVo;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional
|
|
||||||
public FileDownloadEventLogDeleteVo updateFileDownloadEventLogDelete(FileDownloadEventLogDeleteDto fileDownloadEventLogDeleteDto) {
|
|
||||||
int updateCount = fileDownloadEventLogMapper.updateFileDownloadEventLogDelete(fileDownloadEventLogDeleteDto);
|
|
||||||
|
|
||||||
FileDownloadEventLogDeleteVo fileDownloadEventLogDeleteVo = new FileDownloadEventLogDeleteVo();
|
|
||||||
fileDownloadEventLogDeleteVo.setDeleted(updateCount > 0);
|
|
||||||
fileDownloadEventLogDeleteVo.setFileDownloadEventLogIdx(fileDownloadEventLogDeleteDto.getFileDownloadEventLogIdx());
|
|
||||||
fileDownloadEventLogDeleteVo.setResultCode(updateCount > 0 ? 2005 : 2003);
|
|
||||||
|
|
||||||
return fileDownloadEventLogDeleteVo;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user