Commit e2648225 by WangJinfeng

fix logback-spring.xml

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