修复 添加设备接口

This commit is contained in:
shikong 2023-10-09 14:34:09 +08:00
parent 91b488d9a6
commit c2dcf6d931

View File

@ -89,7 +89,7 @@ public class DeviceService {
if(StringUtils.isBlank(deviceCode)){
throw new JsonException("设备编码不能为空");
}
if(getDeviceByDeviceCode(deviceCode).isEmpty()){
if(getDeviceByDeviceCode(deviceCode).isPresent()){
throw new JsonException(MessageFormat.format("设备编码 {0} 已存在" ,deviceCode));
}