|
@@ -60,7 +60,7 @@ public class TBAttachmentServiceImpl extends ServiceImpl<TBAttachmentMapper, TBA
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public TBAttachment saveAttachment(MultipartFile file, String md5, String path, Map<String, Object> map,
|
|
|
- UploadFileEnum type, Long orgId, Long userId) throws IOException {
|
|
|
+ UploadFileEnum type, Long orgId, Long userId) throws IOException {
|
|
|
log.info("ossMap:{}", JacksonUtil.parseJson(map));
|
|
|
TBAttachment tbAttachment = null;
|
|
|
try {
|
|
@@ -118,10 +118,10 @@ public class TBAttachmentServiceImpl extends ServiceImpl<TBAttachmentMapper, TBA
|
|
|
throw new BusinessException(ExceptionResultEnum.ATTACHMENT_TYPE_IS_NULL);
|
|
|
} else if (Objects.equals(uploadType, UploadFileEnum.base_photo.name())) {
|
|
|
stringJoiner.add(uploadType).add(File.separator).add(String.valueOf(orgId));
|
|
|
- } else {
|
|
|
- stringJoiner.add(uploadType);
|
|
|
+ } else if (!Objects.equals(uploadType, UploadFileEnum.file.name())) {
|
|
|
+ stringJoiner.add(uploadType).add(File.separator);
|
|
|
}
|
|
|
- stringJoiner.add(File.separator).add(String.valueOf(nowTime.getYear())).add(File.separator)
|
|
|
+ stringJoiner.add(String.valueOf(nowTime.getYear())).add(File.separator)
|
|
|
.add(String.valueOf(nowTime.getMonthValue())).add(File.separator)
|
|
|
.add(String.valueOf(nowTime.getDayOfMonth()));
|
|
|
if (oss) {//上传至oss
|
|
@@ -165,7 +165,7 @@ public class TBAttachmentServiceImpl extends ServiceImpl<TBAttachmentMapper, TBA
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public TBAttachment saveAttachment(File file, String md5, String path, Map<String, Object> map, UploadFileEnum type,
|
|
|
- Long orgId, Long userId) throws IOException {
|
|
|
+ Long orgId, Long userId) throws IOException {
|
|
|
log.info("ossMap:{}", JacksonUtil.parseJson(map));
|
|
|
TBAttachment tbAttachment = null;
|
|
|
try {
|
|
@@ -255,7 +255,7 @@ public class TBAttachmentServiceImpl extends ServiceImpl<TBAttachmentMapper, TBA
|
|
|
|
|
|
@Override
|
|
|
public TBAttachment saveAttachment(String path, Map<String, Object> map, UploadFileEnum type, Long orgId,
|
|
|
- Long userId) throws IOException {
|
|
|
+ Long userId) throws IOException {
|
|
|
return null;
|
|
|
}
|
|
|
|