服务端公共类调整完善

This commit is contained in:
huxin02 2025-03-21 20:21:54 +08:00
parent 8e75a3f70d
commit 7e2c49d666
8 changed files with 5 additions and 4 deletions

View File

@ -5,7 +5,6 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.FormHttpMessageConverter; import org.springframework.http.converter.FormHttpMessageConverter;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
/** /**
* http客户端配置 * http客户端配置
* @author hx * @author hx

View File

@ -27,7 +27,6 @@ public class DynamicLogSwitcherController {
private final String LOG_SWITCHER_URI = "/log-switcher"; private final String LOG_SWITCHER_URI = "/log-switcher";
// 获取日志工厂会话 // 获取日志工厂会话
private final LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory(); private final LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
/** /**
* 日志开关 * 日志开关
* @param logger 日志 * @param logger 日志

View File

@ -38,7 +38,6 @@ public class FileManagerController {
* 下载数据 * 下载数据
*/ */
private static final String DOWNLOAD_DATA = "/download-data/**"; private static final String DOWNLOAD_DATA = "/download-data/**";
public FileManagerController(FtpService ftpService) { public FileManagerController(FtpService ftpService) {
this.ftpService = ftpService; this.ftpService = ftpService;
} }

View File

@ -30,7 +30,6 @@ public class FilesUploadController {
private final String[] allowFileType = new String[] {"JPG","GIF","PNG","JPEG","BMP","DOC","DOCX","XLS" private final String[] allowFileType = new String[] {"JPG","GIF","PNG","JPEG","BMP","DOC","DOCX","XLS"
,"XLSX","PDF","PPT","PPTX","TXT","CVS","TIF","WEBP","TIFF","ZIP","RAR","7Z","MP4","AVI","WMV" ,"XLSX","PDF","PPT","PPTX","TXT","CVS","TIF","WEBP","TIFF","ZIP","RAR","7Z","MP4","AVI","WMV"
,"MOV","JSON","MD","PSD","EXE"}; ,"MOV","JSON","MD","PSD","EXE"};
public FilesUploadController(FtpService ftpService) { public FilesUploadController(FtpService ftpService) {
this.ftpService = ftpService; this.ftpService = ftpService;
} }

View File

@ -42,4 +42,6 @@ public class ImgTransformController {
String base64 = Base64Util.FileBase64FromUrl(ftpService.getFileUrl(savePathName, true)); String base64 = Base64Util.FileBase64FromUrl(ftpService.getFileUrl(savePathName, true));
return Ok.of(base64); return Ok.of(base64);
} }
} }

View File

@ -24,6 +24,7 @@ public class Base64Util {
} else { } else {
base64 = imgbase64;// 这是base64字符串 base64 = imgbase64;// 这是base64字符串
} }
byte[] imageString; byte[] imageString;
imageString = Base64.decodeBase64(base64); imageString = Base64.decodeBase64(base64);
return new ByteArrayInputStream(imageString); return new ByteArrayInputStream(imageString);

View File

@ -40,6 +40,7 @@ public class Constants {
public static final int PERSONNEL_FORGOT_IDENTIFY_NOT_AGREEMENT = 50000; public static final int PERSONNEL_FORGOT_IDENTIFY_NOT_AGREEMENT = 50000;
} }
/** /**
* 异常代码 * 异常代码
*/ */

View File

@ -21,6 +21,7 @@ public class DateUtil {
calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.MINUTE, 0);
calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.SECOND, 0);
return calendar.getTime(); return calendar.getTime();
} }
public static Date str2Date(String dateStr, String format) { public static Date str2Date(String dateStr, String format) {