Commit 1ac73972 authored by hanbing's avatar hanbing

[update] 配置文件判空

parent b74d5a28
......@@ -1012,12 +1012,14 @@ public class TrendServiceImpl implements TrendService {
}
private Integer convertDirCode(String dirStr, String crossId, Integer dirCode) {
List<String> dirMapList = directionMappingsConfig.getMappings().get(crossId); // 如 ["东:2","西:6"]
if (CollectionUtil.isNotEmpty(dirMapList)) {
for (String dirMapStr : dirMapList) {
String[] split = dirMapStr.split(":");
if (dirStr.equals(split[0])) {
dirCode = Integer.parseInt(split[1]);
if (ObjectUtil.isNotEmpty(directionMappingsConfig)) {
List<String> dirMapList = directionMappingsConfig.getMappings().get(crossId); // 如 ["东:2","西:6"]
if (CollectionUtil.isNotEmpty(dirMapList)) {
for (String dirMapStr : dirMapList) {
String[] split = dirMapStr.split(":");
if (dirStr.equals(split[0])) {
dirCode = Integer.parseInt(split[1]);
}
}
}
}
......
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