Authored by qinchao

恶意ip界面完善

... ... @@ -202,14 +202,20 @@ public class MaliciousIpServiceImpl implements MaliciousIpService {
for(int i=0;i<ipsObjArray.size();i++){
JSONObject jo= ipsObjArray.getJSONObject(i);
String ip=jo.getString("ip");
String reason=jo.toJSONString();
String reason=jo.getString("reason");
//String duration=jo.get("duration")==null?"":""+jo.get("duration");
if(StringUtils.isNotBlank(ip)){
//写入mysql
MaliciousIpsRecordForbid record=new MaliciousIpsRecordForbid();
record.setIp(ip);
record.setReason(reason);
maliciousIpsRecordForbidMapper.insert(record);
logger.info("MaliciousIpServiceImpl writeMipsObjToOpsReids - "+ip);
}
}
}
... ...