Commit e2648225 by WangJinfeng

fix logback-spring.xml

parent 18adaa78
......@@ -5,6 +5,7 @@ import com.mobvista.apptag.entity.TreeTag;
import com.mobvista.apptag.mapper.TreeTagDao;
import com.mobvista.apptag.service.TreeTagService;
import com.mobvista.apptag.utils.Query;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -54,10 +55,23 @@ public class TreeTagServiceImpl implements TreeTagService {
TreeTag treeTag = new TreeTag();
String[] strings = lineTxt.replaceAll("\uFEFF", "").split(",", -1);
if (strings.length > 1) {
String packageName = strings[0].trim();
String firstTag = strings[1];
String secondTag = strings[2];
String thirdTag = strings[3];
String firstTag = "";
if (StringUtils.isNotBlank(strings[1])) {
firstTag = strings[1];
} else {
continue;
}
String secondTag = "";
if (strings.length > 2 && StringUtils.isNotBlank(strings[2])) {
secondTag = strings[2];
}
String thirdTag = "";
if (strings.length > 3 && StringUtils.isNotBlank(strings[3])) {
thirdTag = strings[1];
}
String platform = "";
if (idIosPkgPtn.matcher(packageName).matches()) {
packageName = packageName.replace("id", "");
......@@ -93,6 +107,7 @@ public class TreeTagServiceImpl implements TreeTagService {
set.add(newTreeTag);
}
}
}
bufferedReader.close();
read.close();
if (batchInsert(new ArrayList<>(set))) {
......
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