IpRuleItemEnum.java
1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.ui.common;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by meiling.ge on 2017/8/21.
* 恶意Ip管理---规则项
*/
public enum IpRuleItemEnum {
QPS("qps","qps"),
DIFMETHODCOUNT("difMethodCount","访问接口次数"),
IMPCOUNT("impCount","敏感接口访问次数"),
IMPAPIPRECENT("impApiPrecent","敏感接口占比"),
UIDCOUNT("uidCount","uid个数"),
UDIDCOUNT("udidCount","udid个数"),
NOTEXSITUDIDCOUNT("notExsitUdidCount","不存在的udid个数"),
NOTEXISTUDIDPERCENT("notExistUdidPercent","不存在的udid占比"),
DEVICETYPECOUNT("deviceTypeCount","设备类型总数");
private String item;
private String desc;
IpRuleItemEnum(String item, String desc){
this.item = item;
this.desc = desc;
}
public static List<Map<String,String>> getAll(){
IpRuleItemEnum[] values = IpRuleItemEnum.values();
List<Map<String,String>> list = new ArrayList<>(values.length);
for(IpRuleItemEnum val : values){//前端 select的数据格式
Map<String,String> map = new HashMap<>();
map.put("value",val.item);
map.put("text",val.desc);
list.add(map);
}
return list;
}
}