.
18516761980
2022-03-01 0efa0c7736c1554ea54de545e91a4577b64603df
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
package zy.cloud.wms.common.model.enums;
 
import com.core.exception.CoolException;
 
public enum VisitType {
 
    CUSTOMER(1L, "Customer/客户"),
    SUPPLIER(2L, "Supplier供应商"),
    OTHER(3L, "other/其他"),
    ;
 
    private Long id;
    private String msg;
 
    VisitType(Long id, String msg) {
        this.id = id;
        this.msg = msg;
    }
 
    public static VisitType get(Long id) {
        VisitType[] types = VisitType.values();
        for (VisitType type : types) {
            if (id.equals(type.getId())) {
                return type;
            }
        }
        throw new CoolException("500-访客类型错误,id=" + id);
    }
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public String getMsg() {
        return msg;
    }
 
    public void setMsg(String msg) {
        this.msg = msg;
    }
}