Commit a07bb6e6 by jinfeng.wang

fix bug

parent 373a5a99
...@@ -85,12 +85,12 @@ public class TreeTagServiceImpl implements TreeTagService { ...@@ -85,12 +85,12 @@ public class TreeTagServiceImpl implements TreeTagService {
treeTag.setUpdateTime(new Date()); treeTag.setUpdateTime(new Date());
set.add(treeTag); set.add(treeTag);
if (idIosPkgPtn.matcher(packageName).matches()) { if (idIosPkgPtn.matcher(packageName).matches()) {
treeTag.setPackageName(packageName.replace("id", "")); TreeTag newTreeTag = update(treeTag, packageName.replace("id", ""));
set.add(treeTag); set.add(newTreeTag);
} }
if (iosPkgPtn.matcher(packageName).matches()) { if (iosPkgPtn.matcher(packageName).matches()) {
treeTag.setPackageName("id" + packageName); TreeTag newTreeTag = update(treeTag, "id" + packageName);
set.add(treeTag); set.add(newTreeTag);
} }
} }
bufferedReader.close(); bufferedReader.close();
...@@ -101,6 +101,12 @@ public class TreeTagServiceImpl implements TreeTagService { ...@@ -101,6 +101,12 @@ public class TreeTagServiceImpl implements TreeTagService {
return false; return false;
} }
private TreeTag update(TreeTag oldTreeTag, String packageName) {
TreeTag treeTag = oldTreeTag;
treeTag.setPackageName(packageName);
return treeTag;
}
public boolean batchInsert(List<TreeTag> list) { public boolean batchInsert(List<TreeTag> list) {
for (int i = 0; i <= list.size() / 1000; i++) { for (int i = 0; i <= list.size() / 1000; i++) {
int startIndex = i * 1000; int startIndex = i * 1000;
......
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