init
This commit is contained in:
55
src/main/java/com/newyetai/sdk/common/dto/ISdkRequest.java
Normal file
55
src/main/java/com/newyetai/sdk/common/dto/ISdkRequest.java
Normal file
@@ -0,0 +1,55 @@
|
||||
package com.newyetai.sdk.common.dto;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.springframework.core.ParameterizedTypeReference;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
/**
|
||||
* 请求对象
|
||||
* @author sr on 2021-03-18
|
||||
*/
|
||||
public interface ISdkRequest<RES> extends Serializable{
|
||||
|
||||
/**
|
||||
* 方法名
|
||||
* @return
|
||||
* @author sr on 2021-12-27
|
||||
*/
|
||||
@JsonIgnore
|
||||
default String getMethodName() {
|
||||
return this.getClass().getSimpleName();
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用uri
|
||||
* @return
|
||||
* @author sr on 2021-12-27
|
||||
*/
|
||||
@JsonIgnore
|
||||
default String getUri() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 结果集普通类型
|
||||
* @return
|
||||
* @author sr on 2021-12-20
|
||||
*/
|
||||
@JsonIgnore
|
||||
default Class<RES> getResponseClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 结果集带范性类型
|
||||
* @return
|
||||
* @author sr on 2021-12-20
|
||||
*/
|
||||
@JsonIgnore
|
||||
default ParameterizedTypeReference<RES> getResponseType() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user