优化代码

This commit is contained in:
XinYi Song 2022-02-25 15:06:30 +08:00
parent e8613bbdd0
commit 233420973b

View File

@ -109,7 +109,7 @@ public class FireController {
public String updateFireState(@RequestBody Map map){ public String updateFireState(@RequestBody Map map){
String alarmCode = (String) map.get("alarmCode"); String alarmCode = (String) map.get("alarmCode");
Fire byAlarmCode = fireDao.findByAlarmCode(alarmCode); Fire byAlarmCode = fireDao.findByAlarmCode(alarmCode);
if(byAlarmCode != null){ if(byAlarmCode == null){
return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"火情编码错误,请检查!",locale); return outputEncapsulationObject(PromptMessageEnum.DATA_NONE,"火情编码错误,请检查!",locale);
} }
if("1".equals(byAlarmCode.getFireState())){ if("1".equals(byAlarmCode.getFireState())){