Commit ecf6b9b6 authored by 赵啸非's avatar 赵啸非

添加校验

parent 92083c91
Pipeline #2763 failed with stages
......@@ -121,9 +121,14 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
Map<String, Object> model = new HashMap<>();
String busiDesc = this.getModuleDesc() + "设备";
try {
log.info("检测设备状态:{}", JSON.toJSONString(deviceEntity));
if (!ObjectUtils.isEmpty(deviceEntity.getDeviceCode())) {
DeviceEntity entity = this.service.getExtCache(deviceEntity.getDeviceCode());
jsonObject.put(KEY_RESULT_DATA, entity);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
} else {
throw new AppException("设备编号不能为空!");
}
} catch (Exception e) {
log.error("检测设备消息", e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
......
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