Merge remote-tracking branch 'base-version/main' into dev

This commit is contained in:
chenbowen
2025-09-26 12:58:31 +08:00
6 changed files with 120 additions and 20 deletions

View File

@@ -5,6 +5,7 @@ import cn.hutool.core.io.FileUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.digest.DigestUtil;
import com.google.common.annotations.VisibleForTesting;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.util.object.BeanUtils;
import com.zt.plat.module.infra.controller.admin.file.vo.file.FileCreateReqVO;
@@ -18,7 +19,6 @@ import com.zt.plat.module.infra.framework.file.core.client.FileClient;
import com.zt.plat.module.infra.framework.file.core.client.s3.FilePresignedUrlRespDTO;
import com.zt.plat.module.infra.framework.file.core.utils.FileTypeUtils;
import com.zt.plat.module.infra.util.VerificationCodeUtil;
import com.google.common.annotations.VisibleForTesting;
import jakarta.annotation.Resource;
import lombok.SneakyThrows;
import org.apache.commons.lang3.StringUtils;
@@ -122,7 +122,8 @@ public class FileServiceImpl implements FileService {
@SneakyThrows
public String createFile(byte[] content, String name, String directory, String type, Boolean encrypt) {
FileDO entity = uploadFile(content, name, directory, type, encrypt);
return entity.getUrl();
FileRespVO fileRespVO = BeanUtils.toBean(entity, FileRespVO.class);
return fileRespVO.getUrl();
}
@SneakyThrows