Commit 0e2c90bd by zhangkb

修改标签元数据导入接口

parent f23569f7
...@@ -61,8 +61,8 @@ public class TagFileService { ...@@ -61,8 +61,8 @@ public class TagFileService {
importLog.setCreator(userName); importLog.setCreator(userName);
importLog.setDept(dept); importLog.setDept(dept);
mongoOperations.save(importLog); mongoOperations.save(importLog);
new Thread(new TagMetadataImportExecutor(userName, userId, dept,idPath,dimensionType,tagType, this.TagMetadataImportExecutor(userName, userId, dept,idPath,dimensionType,tagType,
file, importLog)).start(); file, importLog);
return "ok"; return "ok";
} }
...@@ -215,29 +215,9 @@ public class TagFileService { ...@@ -215,29 +215,9 @@ public class TagFileService {
/** /**
*author:zhangkb time:2020-1-14 desc:标签管理导入 *author:zhangkb time:2020-1-14 desc:标签管理导入
*/ */
class TagMetadataImportExecutor implements Runnable{ public void TagMetadataImportExecutor (String userName, String userId, String dept,
private String dept;
private MultipartFile file;
private ImportLog importLog;
private String userName;
private String userId;
private String idPath;
private String dimensionType;
private String tagType;
public TagMetadataImportExecutor(String userName, String userId, String dept,
String idPath,String dimensionType,String tagType, String idPath,String dimensionType,String tagType,
MultipartFile file, ImportLog importLog) { MultipartFile file, ImportLog importLog){
this.userName = userName;
this.userId = userId;
this.dept = dept;
this.file = file;
this.importLog = importLog;
this.idPath = idPath;
this.dimensionType = dimensionType;
this.tagType = tagType;
}
@Override
public void run() {
try { try {
boolean hasOtherFail = false; boolean hasOtherFail = false;
...@@ -288,7 +268,6 @@ public class TagFileService { ...@@ -288,7 +268,6 @@ public class TagFileService {
mongoOperations.save(importLog); mongoOperations.save(importLog);
} }
} }
}
class TagMetadataVerifyHandler implements IExcelVerifyHandler<TagMetadata>{ class TagMetadataVerifyHandler implements IExcelVerifyHandler<TagMetadata>{
@Override @Override
public ExcelVerifyHandlerResult verifyHandler(TagMetadata obj) { public ExcelVerifyHandlerResult verifyHandler(TagMetadata obj) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment