Commit 99c2501f authored by wujipeng's avatar wujipeng
Browse files

服务器监控

parent 08cf0f0d
...@@ -32,4 +32,6 @@ public class ProjectServerMonitorDTO extends ProjectServerMonitorEntity { ...@@ -32,4 +32,6 @@ public class ProjectServerMonitorDTO extends ProjectServerMonitorEntity {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endDate; private Date endDate;
private String ips;
} }
...@@ -20,4 +20,8 @@ public class BsProjectEntity { ...@@ -20,4 +20,8 @@ public class BsProjectEntity {
@ApiModelProperty("项目描述") @ApiModelProperty("项目描述")
@TableField("description") @TableField("description")
private String description; private String description;
@ApiModelProperty("项目ip列表")
@TableField("ips")
private String ips;
} }
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
select select
bp.id id, bp.id id,
bp.project_name projectName, bp.project_name projectName,
bp.description description bp.description description,
bp.ips ips
from from
bs_project bp bs_project bp
</select> </select>
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
ROW_NUMBER() OVER (PARTITION BY ip_address ORDER BY timestamp DESC) as rn ROW_NUMBER() OVER (PARTITION BY ip_address ORDER BY timestamp DESC) as rn
FROM project_server_monitor FROM project_server_monitor
<where> <where>
FIND_IN_SET(ip_address, #{ips})
<if test="ipAddress != null and ipAddress != ''"> <if test="ipAddress != null and ipAddress != ''">
and ip_address = #{ipAddress} and ip_address = #{ipAddress}
</if> </if>
......
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