Commit af7a9b2f authored by duanruiming's avatar duanruiming

[update] 解决优化bug

parent a27f0409
......@@ -26,7 +26,7 @@ public class CrossInfoCache implements CommandLineRunner {
@Resource
private ManufacturerInfoMapper manufacturerInfoMapper;
private static final List<CrossInfoPO> crossInfoList = new ArrayList<>();
private static List<CrossInfoPO> crossInfoList = new ArrayList<>();
/**
* 通过路口编号获取厂商编码
......@@ -54,7 +54,7 @@ public class CrossInfoCache implements CommandLineRunner {
public CrossInfoPO getCrossInfoPO(String crossId) {
if (!CollectionUtils.isEmpty(crossInfoList)) {
for (CrossInfoPO crossInfoPO : crossInfoList) {
if (StringUtils.equals(crossId, crossInfoPO.getCode())) {
if (StringUtils.equals(crossId, crossInfoPO.getId())) {
return crossInfoPO;
}
}
......@@ -70,7 +70,7 @@ public class CrossInfoCache implements CommandLineRunner {
public void init() {
List<CrossInfoPO> crossInfoPOList = crossInfoMapper.selectAll();
if (!CollectionUtils.isEmpty(crossInfoPOList)) {
crossInfoPOList = crossInfoPOList;
crossInfoList = crossInfoPOList;
}
}
}
......@@ -29,7 +29,6 @@ public class ControlCommandVO {
private Integer command;
@ApiModelProperty(value = "1全红 2黄闪 3关灯")
@NotNull(message = "控制类型不可为空,1全红 2黄闪 3关灯")
private Integer controlType;
@ApiModelProperty(value = "持续时间")
......
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