Commit a07bb6e6 by jinfeng.wang

fix bug

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