package cc.mrbird.febs.common.enumerates; import lombok.Getter; import java.util.ArrayList; import java.util.List; @Getter public enum GameRoomTypeEnum { /** private String roomName;//名称 private Integer roomType;//房间类型 1-初级房2-土豪房3-尊爵房 private BigDecimal roomAmount;//进入最小金额 private BigDecimal minAmount;//投注最小金额 private BigDecimal maxAmount;//投注最大金额 private List amounts;//投注金额 */ ROOM_THREE("ROOM_THREE", "尊爵房",3,20000,1000,5000,"1000,2000,3000,4000,5000"), ROOM_TWO("ROOM_TWO", "土豪房",2,5000,100,500,"100,200,300,400,500"), ROOM_ONE("ROOM_ONE", "初级房",1,1000,10,50,"10,20,30,40,50"); private String roomCode;//名称 private String roomName;//名称 private Integer roomType;//房间类型 1-初级房2-土豪房3-尊爵房 private Integer roomAmount;//进入最小金额 private Integer minAmount;//投注最小金额 private Integer maxAmount;//投注最大金额 private String amounts;//投注金额 GameRoomTypeEnum(String roomCode, String roomName, Integer roomType, Integer roomAmount, Integer minAmount, Integer maxAmount, String amounts) { this.roomCode = roomCode; this.roomName = roomName; this.roomType = roomType; this.roomAmount = roomAmount; this.minAmount = minAmount; this.maxAmount = maxAmount; this.amounts = amounts; } /** * 获取全部列表 * @return */ public List getRoomList() { List objects = new ArrayList<>(); for (GameRoomTypeEnum value : GameRoomTypeEnum.values()) { objects.add(value); } return objects; } public GameRoomTypeEnum getRoom(int roomType) { for (GameRoomTypeEnum value : GameRoomTypeEnum.values()) { if (value.roomType == roomType) { return value; } } return null; } }