aa51513
2021-05-15 d06fbb7626ca5c9e4e7a91ac06a6f2ae186c0f27
java110-bean/src/main/java/com/java110/entity/center/Business.java
@@ -7,18 +7,25 @@
 * 业务数据
 * Created by wuxw on 2018/4/13.
 */
public class Business implements Comparable{
public class Business implements Comparable<Business>{
    private String bId;
    //业务编码
    private String serviceCode;
    private String businessTypeCd;
    private String serviceName;
    private String remark;
    private String isInstance;
    private JSONObject datas;
    //透传
    private String transferData;
    private JSONArray attrs;
    //返回 编码
@@ -101,6 +108,22 @@
        this.seq = seq;
    }
    public String getIsInstance() {
        return isInstance;
    }
    public void setIsInstance(String isInstance) {
        this.isInstance = isInstance;
    }
    public String getTransferData() {
        return transferData;
    }
    public void setTransferData(String transferData) {
        this.transferData = transferData;
    }
    /**
     * 构建成对象
     * @return
@@ -110,11 +133,29 @@
        try{
            this.setbId(businessObj.getString("bId"));
            this.setServiceCode(businessObj.getString("serviceCode"));
            this.setServiceName(businessObj.getString("serviceName"));
            this.setRemark(businessObj.getString("remark"));
            this.setDatas(businessObj.getJSONObject("datas"));
            this.setAttrs(businessObj.getJSONArray("attrs"));
            this.setBusinessTypeCd(businessObj.getString("businessTypeCd"));
            if(businessObj.containsKey("serviceName")) {
                this.setServiceName(businessObj.getString("serviceName"));
            }
            if(businessObj.containsKey("remark")) {
                this.setRemark(businessObj.getString("remark"));
            }
            if(businessObj.containsKey("isInstance")){
                this.setIsInstance(businessObj.getString("isInstance"));
            }
            if(businessObj.containsKey("datas")) {
                this.setDatas(businessObj.getJSONObject("datas"));
            }
            if(businessObj.containsKey("attrs")){
                this.setAttrs(businessObj.getJSONArray("attrs"));
            }
            if(businessObj.containsKey("transferData")){
                this.setTransferData(businessObj.getString("transferData"));
            }
            if(businessObj.containsKey("response")){
                this.setCode(businessObj.getJSONObject("response").getString("code"));
                this.setMessage(businessObj.getJSONObject("response").getString("message"));
@@ -126,11 +167,18 @@
    }
    @Override
    public int compareTo(Object o) {
        Business otherBusiness = (Business)o;
    public int compareTo(Business otherBusiness) {
        if(this.getSeq() > otherBusiness.getSeq()) {
            return -1;
        }
        return 0;
    }
    public String getBusinessTypeCd() {
        return businessTypeCd;
    }
    public void setBusinessTypeCd(String businessTypeCd) {
        this.businessTypeCd = businessTypeCd;
    }
}