...
|
...
|
@@ -11,6 +11,7 @@ import com.monitor.model.response.BaseResponse; |
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
...
|
...
|
@@ -167,22 +168,12 @@ public class MObjectInfoCtrl { |
|
|
|
|
|
MObjectModel model = new MObjectModel();
|
|
|
|
|
|
model.setMoId(mObjectInfo.getMoId());
|
|
|
|
|
|
model.setMoName(mObjectInfo.getMoName());
|
|
|
|
|
|
model.setMoHostIp(mObjectInfo.getMoHostIp());
|
|
|
|
|
|
model.setMoTypeId(mObjectInfo.getMoTypeId());
|
|
|
BeanUtils.copyProperties(mObjectInfo,model);
|
|
|
|
|
|
model.setMoTypeName(typeInfoService.queryTypeInfo(mObjectInfo.getMoTypeId()).getTypeName());
|
|
|
|
|
|
model.setMoStatus("normal");
|
|
|
|
|
|
model.setMoTags(mObjectInfo.getMoTags());
|
|
|
|
|
|
model.setMoUrl(mObjectInfo.getMoUrl());
|
|
|
|
|
|
modelList.add(model);
|
|
|
|
|
|
}
|
...
|
...
|
@@ -211,15 +202,7 @@ public class MObjectInfoCtrl { |
|
|
|
|
|
MObjectInfo info = new MObjectInfo();
|
|
|
|
|
|
info.setMoName(request.getMoName());
|
|
|
|
|
|
info.setMoUrl(request.getMoUrl());
|
|
|
|
|
|
info.setMoTypeId(request.getMoTypeId());
|
|
|
|
|
|
info.setMoHostIp(request.getMoHostIp());
|
|
|
|
|
|
info.setMoTags(request.getMoTags());
|
|
|
BeanUtils.copyProperties(request,info);
|
|
|
|
|
|
mobjectService.addMObjectInfo(info);
|
|
|
}
|
...
|
...
|
@@ -280,17 +263,7 @@ public class MObjectInfoCtrl { |
|
|
|
|
|
MObjectInfo info = new MObjectInfo();
|
|
|
|
|
|
info.setMoId(request.getMoId());
|
|
|
|
|
|
info.setMoTags(request.getMoTags());
|
|
|
|
|
|
info.setMoTypeId(request.getMoTypeId());
|
|
|
|
|
|
info.setMoHostIp(request.getMoHostIp());
|
|
|
|
|
|
info.setMoUrl(request.getMoUrl());
|
|
|
|
|
|
info.setMoName(request.getMoName());
|
|
|
BeanUtils.copyProperties(request,info);
|
|
|
|
|
|
mobjectService.updateMObjectInfo(info);
|
|
|
}
|
...
|
...
|
@@ -314,4 +287,5 @@ public class MObjectInfoCtrl { |
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|