zhangf
2024-07-26 698995469a3fcdc3164fc486d18bdbe059b6c92e
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
45
46
47
48
49
50
51
package com.gkhy.fourierSpecialGasMonitor.config.license;
 
import java.util.HashMap;
import java.util.Map;
 
/**
 * 业务接口授权白名单
 * 配置在这里的业务接口前缀,不需要授权
 */
public enum LicenseBizWhiteEnum {
    BIZ_RISK_IDENTIFY("sys","系统管理"),
    BIZ_ACCOUNT("account","用户账号")
    ;
 
 
    private String biz;
    private String bizName;
 
    LicenseBizWhiteEnum(String biz, String bizName) {
        this.biz = biz;
        this.bizName = bizName;
    }
 
    public String getBiz() {
        return biz;
    }
 
    public void setBiz(String biz) {
        this.biz = biz;
    }
 
    public String getBizName() {
        return bizName;
    }
 
    public void setBizName(String bizName) {
        this.bizName = bizName;
    }
 
    static Map<String, LicenseBizWhiteEnum> map;
    static {
        map = new HashMap<>();
        for (LicenseBizWhiteEnum bizEnum : LicenseBizWhiteEnum.values()) {
            map.put(bizEnum.biz,bizEnum);
        }
    }
 
    public static LicenseBizWhiteEnum parse(String biz) {
        return map.get(biz);
    }
}