feat: 附件上传

This commit is contained in:
2025-11-19 16:45:26 +08:00
parent dd3fd18132
commit 5af4d27532
17 changed files with 576 additions and 21 deletions

View File

@@ -14,7 +14,9 @@ package org.nl.dev.modular.file.provider;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import jakarta.annotation.Resource;
import org.nl.dev.modular.file.entity.DevFile;
import org.nl.dev.modular.file.enums.DevFileEngineTypeEnum;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
@@ -81,4 +83,12 @@ public class DevFileApiProvider implements DevFileApi {
.map(JSONUtil::parseObj)
.orElse(new JSONObject());
}
@Override
public JSONObject getFileInfoByUrl(String fileAddress) {
return Optional.ofNullable(devFileService.getOne(new LambdaQueryWrapper<DevFile>()
.eq(DevFile::getDownloadPath, fileAddress)))
.map(JSONUtil::parseObj)
.orElse(new JSONObject());
}
}