Authored by qinchao

接口转换更改

... ... @@ -10,20 +10,28 @@ public class MaliciousIpModel {
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private String deviceTypeCount; //设备类型总数
private String difMethodCount; //访问不同接口数量
private String difmethodcount;
private String impApiPrecent; //敏感接口占比
private String impCount; //敏感接口访问次数
private String impcount;
private String ip; //恶意ip
private String ipPrecent; //ip百分比
private String loginApiCount; //登录接口访问次数
private String notExistUdidPercent;//不存在的udid占比
private String notExsitUdidCount; //不存在的udid个数
private String notexsitudidcount;
private String qps; //qps
private String uidCount; //uid个数
private String uidcount;
private String udidCount; //udid个数
private String udidcount;
private boolean whiteIpFlag; //白名单标志
private long timestamp; //时间戳
private String uidcount_udidcount;//udid上登录uid数
private String allcountpercent;//接口访问密集程度
private String duration; //统计时间:多少秒一个批次,暂时不显示
private String prob;
... ... @@ -59,23 +67,13 @@ public class MaliciousIpModel {
String str="";
str += "<p style='font-size:14px'>";
str += ("QPS: "+this.qps+"<br>");
str += ("访问不同接口数量: "+this.difMethodCount+"<br>");
// str += ("登录接口访问次数: "+this.loginApiCount+"<br>");
str += ("敏感接口访问次数: "+this.impCount+"<br>");
// str += ("敏感接口占比: "+this.impApiPrecent+"<br>");
str += ("ip百分比: "+this.ipPrecent+"<br>");
str += ("uid个数: "+this.uidCount+"<br>");
str += ("udid个数: "+this.udidCount+"<br>");
// str += ("不存在的udid占比: "+this.notExistUdidPercent+"<br>");
str += ("不存在的udid个数: "+this.notExsitUdidCount+"<br>");
str += ("设备类型总数: "+this.deviceTypeCount+"<br>");
// str += ("白名单标志: "+this.whiteIpFlag+"<br>");
// str += ("时间戳: "+sdf.format(new Date(this.timestamp)));
str += ("prob: "+this.prob+"<br>");
str += ("不存在udid个数: "+this.notexsitudidcount+"<br>");
str += ("udid上登录uid数: "+this.uidcount_udidcount+"<br>");
str += ("uid个数: "+this.uidcount+"<br>");
str += ("udid个数: "+this.udidcount+"<br>");
str += ("访问不同接口数: "+this.difmethodcount+"<br>");
str += ("访问敏感接口数: "+this.impcount+"<br>");
str += ("接口访问密集程度: "+this.allcountpercent+"<br>");
str += "</p>";
return str;
}
... ...
... ... @@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.model.HostInfo;
import com.model.MalIpRule;
import com.model.MaliciousIpsRecord;
import com.model.MaliciousIpsRecordForbid;
import com.monitor.cmdb.service.IHostInfoService;
import com.monitor.common.service.HttpRestClientService;
... ... @@ -22,7 +21,6 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestBody;
... ... @@ -30,9 +28,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* 恶意ip
... ...