yujian
2020-06-15 afe70962a8aeaed5ea761835e803e5812df5e9c3
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
52
53
package com.yeshi.fanli.entity.bus.user.cloud;
 
import com.yeshi.fanli.util.StringUtil;
 
public enum CloudOrderMenuEnum {
    robotMonth(0.01, 4, 1, "全能机器人", "一个月");
    
    private double money;
    private Integer robotType;
    private Integer month;
    private String desc;
    private String descShow;
 
    private CloudOrderMenuEnum(double money, Integer robotType, Integer month, String desc, String descShow) {
        this.money = money;
        this.robotType = robotType;
        this.month = month;
        this.desc = desc;
        this.descShow = descShow;
    }
 
    public double getMoney() {
        return money;
    }
 
    public Integer getRobotType() {
        return robotType;
    }
 
    public Integer getMonth() {
        return month;
    }
    
    public String getDesc() {
        return desc;
    }
    
    public String getDescShow() {
        return descShow;
    }
 
    public static CloudOrderMenuEnum  getMenuEnum(String type) {
        if (StringUtil.isNullOrEmpty(type)) 
            return null;
        CloudOrderMenuEnum[] array = CloudOrderMenuEnum.values();
        for (CloudOrderMenuEnum menuEnum: array) {
            if(menuEnum.name().equals(type))
                return menuEnum;
        }
        return null;
    }
}