提交 f926479f 编写于 作者: tangyaolong's avatar tangyaolong

【dst模型初始化】添加注解

上级 c3fac51b
......@@ -127,6 +127,11 @@ public class MetaModelExService extends MetaModelServiceImpl {
return super.importFile(et);
}
/**
* 批量导出数据到json文件中
* @param metaModels
* @return
*/
@Override
@Transactional
public boolean exportFileBatch(List<MetaModel> metaModels) {
......@@ -289,6 +294,11 @@ public class MetaModelExService extends MetaModelServiceImpl {
}
}
/**
* 格式化文件名给请求识别
* @param fileName
* @return
*/
protected String getFileName(String fileName) {
try {
return new String(fileName.getBytes("utf-8"), "iso8859-1");//防止中文乱码
......@@ -339,6 +349,11 @@ public class MetaModelExService extends MetaModelServiceImpl {
throw new InternalServerErrorException("文件未找到");
}
/**
* 获取上传文件路径
* @param fileId
* @return
*/
public File getUploadFile(String fileId) {
String dirPath = this.fileRoot + "ibizutil" + File.separator + fileId;
File parent = new File(dirPath);
......@@ -348,6 +363,12 @@ public class MetaModelExService extends MetaModelServiceImpl {
throw new InternalServerErrorException("文件未找到");
}
/**
* 将流写入文件
* @param filePath
* @param sets
* @throws IOException
*/
public static void writeFile(String filePath, String sets) throws IOException {
FileWriter fw = new FileWriter(filePath);
PrintWriter out = new PrintWriter(fw);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册