Showing
2 changed files
with
13 additions
and
1 deletions
@@ -70,5 +70,17 @@ public class HostInfoCtrl { | @@ -70,5 +70,17 @@ public class HostInfoCtrl { | ||
70 | return hostInfoService.getHostInfoById(id); | 70 | return hostInfoService.getHostInfoById(id); |
71 | } | 71 | } |
72 | 72 | ||
73 | + @RequestMapping("/getHostInfoByIP") | ||
74 | + @ResponseBody | ||
75 | + public BaseResponse<HostInfo> getHostInfoByIp(String ip) throws Exception { | ||
76 | + log.info("getHostInfoByIp with param is {}", ip); | ||
77 | + HostInfo hostInfo= hostInfoService.getHostInfoByHostIp(ip); | ||
78 | + BaseResponse<HostInfo> resp=new BaseResponse<HostInfo>(); | ||
79 | + if(hostInfo!=null){ | ||
80 | + resp.setData(hostInfo); | ||
81 | + } | ||
82 | + return resp; | ||
83 | + } | ||
84 | + | ||
73 | } | 85 | } |
74 | 86 |
@@ -124,8 +124,8 @@ public class MaliciousIpServiceImpl implements MaliciousIpService { | @@ -124,8 +124,8 @@ public class MaliciousIpServiceImpl implements MaliciousIpService { | ||
124 | //发送拦截短信 | 124 | //发送拦截短信 |
125 | String mobile_yunwei = getUsersInfoUtil.getMobileByAlarmGroup(AlarmGroupContants.GROUP_NAME_MALICIOUS_IP); | 125 | String mobile_yunwei = getUsersInfoUtil.getMobileByAlarmGroup(AlarmGroupContants.GROUP_NAME_MALICIOUS_IP); |
126 | String smsStr = "成功捕获恶意ip->" + ip ; | 126 | String smsStr = "成功捕获恶意ip->" + ip ; |
127 | - logger.info(" MaliciousIpServiceImpl writeMipsToOpsReids - "+ip); | ||
128 | alarmMsgService.sendSms("MaliciousIp", smsStr, mobile_yunwei); | 127 | alarmMsgService.sendSms("MaliciousIp", smsStr, mobile_yunwei); |
128 | + logger.info(" MaliciousIpServiceImpl writeMipsToOpsReids - "+ip); | ||
129 | } | 129 | } |
130 | } | 130 | } |
131 | } | 131 | } |
-
Please register or login to post a comment