|
@@ -18,6 +18,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
+import java.math.BigDecimal;
|
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.List;
|
|
|
import java.util.StringJoiner;
|
|
@@ -97,10 +98,8 @@ public class BasicAttachmentServiceImpl extends ServiceImpl<BasicAttachmentMappe
|
|
|
|
|
|
attachment.setName(file.getOriginalFilename());
|
|
|
attachment.setType(type);
|
|
|
- attachment.setSize(Math.toIntExact(size));
|
|
|
+ attachment.setSize(BigDecimal.valueOf(size));
|
|
|
attachment.setMd5(md5);
|
|
|
- attachment.setLevel(StorageLevelEnum.L.name());
|
|
|
- attachment.setStorage(isOss ? StorageTypeEnum.OSS.name() : StorageTypeEnum.LOCAL.name());
|
|
|
attachment.setCreateId(userId);
|
|
|
attachment.setCreateTime(System.currentTimeMillis());
|
|
|
|