wuxw7
2018-04-13 f4b8bf9cd3e0c49e92c196e6f4cabf108e6dcf10
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package com.java110.entity.center;
 
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
 
/**
 * 业务数据
 * Created by wuxw on 2018/4/13.
 */
public class Business {
 
    private String bId;
 
    //业务编码
    private String serviceCode;
 
    private String serviceName;
 
    private String remark;
 
    private JSONArray datas;
 
    private JSONArray attrs;
    //返回 编码
    private String code;
 
    private String message;
 
 
    public String getbId() {
        return bId;
    }
 
    public void setbId(String bId) {
        this.bId = bId;
    }
 
    public String getServiceCode() {
        return serviceCode;
    }
 
    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode;
    }
 
    public String getServiceName() {
        return serviceName;
    }
 
    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }
 
    public String getRemark() {
        return remark;
    }
 
    public void setRemark(String remark) {
        this.remark = remark;
    }
 
    public JSONArray getDatas() {
        return datas;
    }
 
    public void setDatas(JSONArray datas) {
        this.datas = datas;
    }
 
    public JSONArray getAttrs() {
        return attrs;
    }
 
    public void setAttrs(JSONArray attrs) {
        this.attrs = attrs;
    }
 
    public String getCode() {
        return code;
    }
 
    public void setCode(String code) {
        this.code = code;
    }
 
    public String getMessage() {
        return message;
    }
 
    public void setMessage(String message) {
        this.message = message;
    }
 
    /**
     * 构建成对象
     * @return
     * @throws Exception
     */
    public Business builder(JSONObject businessObj) throws Exception{
 
        try{
            this.setServiceCode(businessObj.getString("serviceCode"));
            this.setServiceName(businessObj.getString("serviceName"));
            this.setRemark(businessObj.getString("remark"));
            this.setDatas(businessObj.getJSONArray("datas"));
            this.setAttrs(businessObj.getJSONArray("attrs"));
        }catch (Exception e){
            throw e;
        }
        return this;
    }
}