Merge remote-tracking branch 'origin/main'

main
zhaokai 2026-02-09 10:57:56 +08:00
commit b298bbdcf5
1 changed files with 14 additions and 0 deletions

View File

@ -71,6 +71,20 @@ public class ZcloudImgFilesFacadeImpl implements ZcloudImgFilesFacade {
return resultFilePath; return resultFilePath;
} }
@Override
public String saveFile(byte[] bytes, String fileName, String path, Long corpinfoId) {
String filePath = corpinfoId.toString() + "/" + DateUtil.getMonth() + "/" + path;
// 文件上传并获取上传路径
String resultFilePath = null;
try {
resultFilePath = Smb.saveFile(new ByteArrayInputStream(bytes),fileName, filePath);
} catch (Exception e) {
throw new RuntimeException(e);
}
return resultFilePath;
}
public static InputStream base64ToInputStream(String base64String) { public static InputStream base64ToInputStream(String base64String) {
if (base64String == null || base64String.isEmpty()) { if (base64String == null || base64String.isEmpty()) {
throw new IllegalArgumentException("Base64 string is null or empty"); throw new IllegalArgumentException("Base64 string is null or empty");