package com.wgcloud.entity;
|
|
import com.wgcloud.util.DateUtil;
|
import org.apache.commons.lang3.StringUtils;
|
|
import java.util.Date;
|
|
/**
|
* @version v3.3
|
* @ClassName:AppState.java
|
* @author: http://www.wgstart.com
|
* @date: 2022年9月16日
|
* @Description: 自定义监控项状态监控
|
* @Copyright: 2019-2022 wgcloud. All rights reserved.
|
*/
|
public class CustomState extends BaseEntity {
|
|
/**
|
*
|
*/
|
private static final long serialVersionUID = 1L;
|
|
|
/**
|
* 自定义监控项信息ID
|
*/
|
private String customInfoId;
|
|
|
/**
|
* 自定义监控项值
|
*/
|
private String customValue;
|
|
/**
|
* 此值用于回显,数据库无此字段,渲染进程趋势图表使用,此字段是为了统一mysql和pgsql字段类型,所以使用了varchar
|
*/
|
private Double customValueDouble;
|
|
|
/**
|
* 添加时间
|
* MM-dd hh:mm:ss
|
*/
|
private String dateStr;
|
|
/**
|
* 创建时间
|
*/
|
private Date createTime;
|
|
public String getCustomInfoId() {
|
return customInfoId;
|
}
|
|
public void setCustomInfoId(String customInfoId) {
|
this.customInfoId = customInfoId;
|
}
|
|
public String getCustomValue() {
|
return customValue;
|
}
|
|
public void setCustomValue(String customValue) {
|
this.customValue = customValue;
|
}
|
|
public String getDateStr() {
|
String s = DateUtil.getDateTimeString(this.getCreateTime());
|
if (!StringUtils.isEmpty(s) && s.length() > 16) {
|
return s.substring(5);
|
}
|
return dateStr;
|
}
|
|
public void setDateStr(String dateStr) {
|
this.dateStr = dateStr;
|
}
|
|
public Date getCreateTime() {
|
return createTime;
|
}
|
|
public void setCreateTime(Date createTime) {
|
this.createTime = createTime;
|
}
|
|
public Double getCustomValueDouble() {
|
if (!StringUtils.isEmpty(customValue)) {
|
try {
|
customValueDouble = Double.valueOf(customValue);
|
} catch (Exception e) {
|
e.printStackTrace();
|
}
|
} else {
|
customValueDouble = 0d;
|
}
|
return customValueDouble;
|
}
|
|
public void setCustomValueDouble(Double customValueDouble) {
|
this.customValueDouble = customValueDouble;
|
}
|
}
|