wuxw
2019-05-09 e546f6e157e79e4074ca23f7e4e48a5c9aea4fdb
java110-bean/src/main/java/com/java110/entity/center/AppService.java
@@ -1,6 +1,7 @@
package com.java110.entity.center;
import java.io.Serializable;
import java.util.Map;
/**
 * 提供服务
@@ -26,7 +27,9 @@
    //只有webservice时才有用
    private String method;
    private String invokeModel;
    private String isInstance;
    private int timeOut;
@@ -91,13 +94,6 @@
        this.method = method;
    }
    public String getInvokeModel() {
        return invokeModel;
    }
    public void setInvokeModel(String invokeModel) {
        this.invokeModel = invokeModel;
    }
    public int getTimeOut() {
        return timeOut;
@@ -131,5 +127,33 @@
        this.messageQueueName = messageQueueName;
    }
    public String getIsInstance() {
        return isInstance;
    }
    public void setIsInstance(String isInstance) {
        this.isInstance = isInstance;
    }
    public AppService builder(Map serviceInfo){
        this.setBusinessTypeCd(serviceInfo.get("business_type_cd").toString());
        this.setMessageQueueName(serviceInfo.get("messageQueueName") == null ? null :serviceInfo.get("messageQueueName").toString());
        this.setMethod(serviceInfo.get("method")==null ? null:serviceInfo.get("method").toString());
        this.setName(serviceInfo.get("name").toString());
        this.setRetryCount(Integer.parseInt(serviceInfo.get("retry_count").toString()));
        this.setSeq(Integer.parseInt(serviceInfo.get("seq").toString()));
        this.setServiceCode(serviceInfo.get("service_code").toString());
        this.setTimeOut(Integer.parseInt(serviceInfo.get("timeout").toString()));
        this.setUrl(serviceInfo.get("url") == null ? null : serviceInfo.get("url").toString());
        this.setServiceId(Integer.parseInt(serviceInfo.get("service_id").toString()));
        this.setIsInstance(serviceInfo.get("is_instance").toString());
        this.setStatusCd("0");
        return this;
    }
    public static AppService newInstance(){
        return new AppService();
    }
}