update 日常校验 统一重构到 StringUtils 便于维护扩展

This commit is contained in:
疯狂的狮子li
2021-08-02 19:28:41 +08:00
parent 5740561cd3
commit c813046594
48 changed files with 493 additions and 239 deletions

View File

@ -147,7 +147,7 @@ public class FileUploadUtils
private static final String getPathFileName(String uploadDir, String fileName) throws IOException
{
int dirLastIndex = RuoYiConfig.getProfile().length() + 1;
String currentDir = StringUtils.subSuf(uploadDir, dirLastIndex);
String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
return pathFileName;
}

View File

@ -83,7 +83,7 @@ public class ImageUtils
{
// 本机地址
String localPath = RuoYiConfig.getProfile();
String downloadPath = localPath + StringUtils.subAfter(url, Constants.RESOURCE_PREFIX,false);
String downloadPath = localPath + StringUtils.substringAfter(url, Constants.RESOURCE_PREFIX);
in = new FileInputStream(downloadPath);
}
return IOUtils.toByteArray(in);