Authored by qinchao

恶意ip管理_新 :外对提供的报警接口

... ... @@ -70,5 +70,17 @@ public class HostInfoCtrl {
return hostInfoService.getHostInfoById(id);
}
@RequestMapping("/getHostInfoByIP")
@ResponseBody
public BaseResponse<HostInfo> getHostInfoByIp(String ip) throws Exception {
log.info("getHostInfoByIp with param is {}", ip);
HostInfo hostInfo= hostInfoService.getHostInfoByHostIp(ip);
BaseResponse<HostInfo> resp=new BaseResponse<HostInfo>();
if(hostInfo!=null){
resp.setData(hostInfo);
}
return resp;
}
}
... ...
... ... @@ -124,8 +124,8 @@ public class MaliciousIpServiceImpl implements MaliciousIpService {
//发送拦截短信
String mobile_yunwei = getUsersInfoUtil.getMobileByAlarmGroup(AlarmGroupContants.GROUP_NAME_MALICIOUS_IP);
String smsStr = "成功捕获恶意ip->" + ip ;
logger.info(" MaliciousIpServiceImpl writeMipsToOpsReids - "+ip);
alarmMsgService.sendSms("MaliciousIp", smsStr, mobile_yunwei);
logger.info(" MaliciousIpServiceImpl writeMipsToOpsReids - "+ip);
}
}
}
... ...