Blame view

src/main/java/com/rnt/vo/BizResult.java 1.12 KB
e80df919   atao   init
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
54
55
  package com.rnt.vo;
  
  import com.rnt.commo.enums.ErrorType;
  
  /**
   * Copyright: Copyright (c) 2017  zteits
   *
   * @ClassName: com.rnt.vo
   * @Description:
   * @version: v1.0.0
   * @author: atao
   * @date: 2017/6/7   下午4:36
   * Modification History:
   * Date         Author          Version      Description
   * ---------------------------------------------------------*
   * 2017/6/7      atao          v1.0.0          创建
   */
  public class BizResult<T> {
      private String code;
      private String msg;
      private T data;
  
      
      
      public String getCode() {
          return code;
      }
  
      public void setCode(String code) {
          this.code = code;
      }
  
      public String getMsg() {
          return msg;
      }
  
      public void setMsg(String msg) {
          this.msg = msg;
      }
  
      public T getData() {
          return data;
      }
  
      public void setData(T data) {
          this.data = data;
          this.code = ErrorType.BIZ_SUCCESS.getCode();
          this.msg = ErrorType.BIZ_SUCCESS.getMsg();
      }
      
      public void setErrorMessage(ErrorType errorType,String msg){
      	this.code = errorType.getCode();
      	this.msg =msg;
      }
  }