Commit 1ac73972 authored by hanbing's avatar hanbing

[update] 配置文件判空

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