Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
王蔡翾
operation_platform
Commits
99c2501f
Commit
99c2501f
authored
Mar 06, 2026
by
wujipeng
Browse files
服务器监控
parent
08cf0f0d
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/example/operation_platform/model/dto/ProjectServerMonitorDTO.java
View file @
99c2501f
...
@@ -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
;
}
}
src/main/java/com/example/operation_platform/model/entity/BsProjectEntity.java
View file @
99c2501f
...
@@ -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
;
}
}
src/main/resources/mapper/BsProjectMapper.xml
View file @
99c2501f
...
@@ -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>
...
...
src/main/resources/mapper/ProjectServerMonitorMapper.xml
View file @
99c2501f
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment