duhuizhe
2024-04-17 c389984b5d3e5523e1b22de1fc045dc415261330
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
package com.yqzx.common.util.enums;
 
public enum SortEmnu {
 
    ASC(1, "asc"),
    DESC(2, "desc");
 
    private Integer code;
 
    private String info;
 
    private SortEmnu(Integer code, String info) {
        this.code = code;
        this.info = info;
    }
 
    public Integer getCode() {
        return code;
    }
 
    public void setCode(Integer code) {
        this.code = code;
    }
 
    public String getInfo() {
        return info;
    }
 
    public void setInfo(String info) {
        this.info = info;
    }
 
 
    public static String getInfo(Integer code) {
        if (code == null) {
            return "";
        }
        for (SortEmnu item : SortEmnu.values()) {
            if (code.equals(item.getCode())) {
                return item.getInfo();
            }
        }
        return "";
    }
 
}