Commit 0b3865fc by zhangkb

修改标签导入逻辑

parent c306c418
......@@ -439,8 +439,11 @@ public class TagFileService {
ExcelImportResult<Tag> excelImportResult = ExcelImportUtil.importExcelMore(file.getInputStream(), Tag.class, params);
List<String> successIds = new ArrayList<>();
List<Tag> tags = excelImportResult.getList();
//author:zhangkb time:2020-3-12 desc:excel解析到的标签路径'\'改成逗号
tags.forEach(tag -> {
tag.setId(UUID.randomUUID().toString());
String tagPath = tag.getPath().replace('\\', ',');
tag.setPath(tagPath);
pathTags.put(tag.getPath(), tag);
});
......@@ -507,6 +510,12 @@ public class TagFileService {
}
@Override
public ExcelVerifyHandlerResult verifyHandler(Tag t) {
//author:zhangkb time:2020-3-12 desc:校验的标签路径'/'改成逗号
String tagPath = t.getPath();
if(StringUtils.isNotBlank(tagPath)) {
tagPath = tagPath.replace('\\', ',');
t.setPath(tagPath);
}
ExcelVerifyHandlerResult result = new ExcelVerifyHandlerResult(true);
if (!Constants.TAG_SYSTEM_TYPE.equals(t.getTagType())
&& !Constants.TAG_PERSONAL_TYPE.equals(t.getTagType())) {
......
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