bsp 新增client端model

yun-zuoyi
nies 4 years ago
parent 66653ed536
commit 46daa2c1cd

@ -0,0 +1,28 @@
package cn.estsh.i3plus.pojo.bsp.client.bean.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.List;
/**
* @author ns
* @create 2021/5/24 0024 11:08
*/
@Getter
@ToString
@AllArgsConstructor
@Api("方法信息")
public class MethodDescription implements Serializable {
@ApiParam("方法的代理对象")
private final Method method;
@ApiParam("方法参数的长度")
private final int ParamLength;
@ApiParam("方法参数的详细信息")
private final List<ParamInfo> paramInfoList;
}

@ -0,0 +1,28 @@
package cn.estsh.i3plus.pojo.bsp.client.bean.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Map;
/**
* @author ns
* @create 2021/5/26 0026 13:24
*
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("方法执行所需要的参数")
public class MethodExcuteParam implements Serializable {
@ApiParam("调用方法的key")
private String methodHandlerKey;
@ApiParam(value = "调用方法的参数map", allowEmptyValue = true)
private Map<String, Object> jsonParamMap;
@ApiParam(value = "调用方法参数列表", allowEmptyValue = true)
private Object[] jsonParamArray;
}

@ -0,0 +1,24 @@
package cn.estsh.i3plus.pojo.bsp.client.bean.model;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author ns
* @create 2021/5/26 0026 17:41
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("参数的信息")
public class ParamInfo {
@ApiParam("参数名")
private String name;
@ApiParam("参数类型名")
private String typeName;
@ApiParam("参数类信息")
private Class clzz;
}

@ -0,0 +1,40 @@
package cn.estsh.i3plus.pojo.bsp.client.bean.po;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author ns
* @create 2021/5/26 0026 14:39
*
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("方法注册的参数列表")
public class MethodRegistryParam implements Serializable {
@ApiParam("方法名")
private String methodName;
@ApiParam("方法所在bean的名字")
private String beanName;
@ApiParam("方法调用所需要的key")
private String methodHandlerKey;
@ApiParam("方法参数列表")
private List<ParamDescription> parameterList;
@ApiParam("方法的版本")
private String version;
@ApiParam("方法影响了那些表")
private String[] affectTableClassName;
@ApiParam("方法的处理逻辑")
private String[] systemProcess;
@ApiParam("方法参数的验证逻辑")
private String[] validation;
}

@ -0,0 +1,42 @@
package cn.estsh.i3plus.pojo.bsp.client.bean.po;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author ns
* @create 2021/5/24 0024 11:08
*
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("参数的注册信息")
public class ParamDescription implements Serializable {
@ApiParam("参数名")
private String name;
@ApiParam(value = "参数类型",defaultValue ="1" ,allowableValues = "0 或者 1")
private Integer type; //出参还是入参
@ApiParam("参数类型名")
private String typeName; //类型
//默认值
@ApiParam("参数默认值")
private String defaultValue;
//允许的值
@ApiParam("参数可选值")
private String[] allowableValues;
//是否必填
@ApiParam("参数是否必填")
private Boolean required;
//例子
@ApiParam("参数的例子")
private String example;
//是否可以为空
@ApiParam("参数是否可以为空")
private Boolean allowEmptyValue;
}

@ -0,0 +1,28 @@
package cn.estsh.i3plus.pojo.bsp.client.bean.po;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author ns
* @create 2021/5/26 0026 14:33
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Api("执行器注册的信息")
public class RegistryParam implements Serializable {
@ApiParam("执行器的名称")
private String appname;
@ApiParam("执行器的地址")
private String address;
@ApiParam("执行器注册的方法信息")
private List<MethodRegistryParam> methodRegistryParamList;
}

@ -0,0 +1,58 @@
package cn.estsh.i3plus.pojo.bsp.comon;
import java.io.Serializable;
/**
* common return
* @author xuxueli 2015-12-4 16:32:31
* @param <T>
*/
public class ReturnT<T> implements Serializable {
public static final long serialVersionUID = 42L;
public static final int SUCCESS_CODE = 200;
public static final int FAIL_CODE = 500;
public static final ReturnT<String> SUCCESS = new ReturnT<String>(null);
public static final ReturnT<String> FAIL = new ReturnT<String>(FAIL_CODE, null);
private int code;
private String msg;
private T content;
public ReturnT(){}
public ReturnT(int code, String msg) {
this.code = code;
this.msg = msg;
}
public ReturnT(T content) {
this.code = SUCCESS_CODE;
this.content = content;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public T getContent() {
return content;
}
public void setContent(T content) {
this.content = content;
}
@Override
public String toString() {
return "ReturnT [code=" + code + ", msg=" + msg + ", content=" + content + "]";
}
}

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
-->
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
<id>i3plus-pojo-softswitch</id>
<classpath>
<dir name="K:/dongshang/i3plus-pojo/modules/i3plus-pojo-softswitch/target/classes">
</dir>
</classpath>
</application>
Loading…
Cancel
Save