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,43 +55,57 @@ public class TreeTagServiceImpl implements TreeTagService {
TreeTag treeTag = new TreeTag();
String[] strings = lineTxt.replaceAll("\uFEFF", "").split(",", -1);
String packageName = strings[0].trim();
String firstTag = strings[1];
String secondTag = strings[2];
String thirdTag = strings[3];
String platform = "";
if (idIosPkgPtn.matcher(packageName).matches()) {
packageName = packageName.replace("id", "");
}
if (iosPkgPtn.matcher(packageName).matches()) {
platform = "ios";
} else if (adrPkgPtn.matcher(packageName).matches()) {
platform = "android";
}
treeTag.setPackageName(packageName);
treeTag.setPlatform(platform);
if (strPtn.matcher(firstTag).matches()) {
treeTag.setFirstTag(firstTag);
}
if (strPtn.matcher(secondTag).matches()) {
treeTag.setSecondTag(secondTag);
} else {
treeTag.setSecondTag("");
}
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);
if (strings.length > 1) {
String packageName = strings[0].trim();
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", "");
}
if (iosPkgPtn.matcher(packageName).matches()) {
platform = "ios";
} else if (adrPkgPtn.matcher(packageName).matches()) {
platform = "android";
}
treeTag.setPackageName(packageName);
treeTag.setPlatform(platform);
if (strPtn.matcher(firstTag).matches()) {
treeTag.setFirstTag(firstTag);
}
if (strPtn.matcher(secondTag).matches()) {
treeTag.setSecondTag(secondTag);
} else {
treeTag.setSecondTag("");
}
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();
......
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