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
  | package com.dy.common.mybatis.envm; 
 |    
 |  import com.baomidou.mybatisplus.annotation.EnumValue; 
 |    
 |  public enum Disabled implements IEnum{ 
 |       
 |      YES((byte)1, "是"), 
 |      NO((byte)0, "否"); 
 |    
 |      @EnumValue 
 |      public Byte code ; 
 |      public String name ; 
 |    
 |      Disabled(Byte code, String name){ 
 |          this.code = code ; 
 |          this.name = name ; 
 |      } 
 |    
 |      /** 
 |       * 实际上转json,见Pojo的对应属性 
 |       * @return json 
 |       */ 
 |      //public String toString(){ 
 |      //    return "{\"code\":" + this.code + "," + "\"name\":" + this.name + "}" ; 
 |      //} 
 |    
 |      @Override 
 |      public Byte getCode() { 
 |          return this.code ; 
 |      } 
 |    
 |      @Override 
 |      public String getName() { 
 |          return this.name ; 
 |      } 
 |  } 
 |  
  |