This commit is contained in:
六如
2024-10-04 21:48:38 +08:00
parent 00da3cc0a9
commit c08fec74c9
987 changed files with 24735 additions and 22137 deletions

View File

@@ -24,7 +24,7 @@ import java.util.Map;
/**
* 请求客户端,申明一个即可
*
* @author tanghc
* @author 六如
*/
public class OpenClient {
private static final Log log = LogFactory.getLog(OpenClient.class);

View File

@@ -26,7 +26,7 @@ import java.util.concurrent.TimeUnit;
/**
* HTTP请求工具
*
* @author tanghc
* @author 六如
*/
public class OpenHttp {
private static final MediaType MEDIA_TYPE_JSON = MediaType.parse("application/json; charset=utf-8");

View File

@@ -17,7 +17,7 @@ import java.util.Map;
/**
* 负责请求操作
*
* @author tanghc
* @author 六如
*/
public class OpenRequest {

View File

@@ -11,7 +11,7 @@ package com.gitee.sop.sdk.common;
* },
* "sign": "ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE"
* }
* @author tanghc
* @author 六如
*/
public class CustomDataNameBuilder implements DataNameBuilder {
private String dataName = "result";

View File

@@ -1,7 +1,7 @@
package com.gitee.sop.sdk.common;
/**
* @author tanghc
* @author 六如
*/
public interface DataNameBuilder {
/**

View File

@@ -14,7 +14,7 @@ package com.gitee.sop.sdk.common;
* "sign": "ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE"
* }
* </pre>
* @author tanghc
* @author 六如
*/
public class DefaultDataNameBuilder implements DataNameBuilder {
private static final char DOT = '.';

View File

@@ -3,7 +3,7 @@ package com.gitee.sop.sdk.common;
import lombok.Data;
/**
* @author tanghc
* @author 六如
*/
@Data
public class OpenConfig {

View File

@@ -8,7 +8,7 @@ import java.util.Map;
/**
* 请求form
* @author tanghc
* @author 六如
*/
@Getter
@Setter

View File

@@ -2,10 +2,10 @@ package com.gitee.sop.sdk.common;
/**
* 请求方法枚举
* @author tanghc
* @author 六如
*/
public enum RequestMethod {
GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE
}
}

View File

@@ -1,10 +1,10 @@
package com.gitee.sop.sdk.common;
/**
* @author tanghc
* @author 六如
*/
public class SopSdkConstants {
public static String DATA_SUFFIX = "_response";
public static String ERROR_RESPONSE_KEY = "error_response";
}
}

View File

@@ -3,7 +3,7 @@ package com.gitee.sop.sdk.common;
import com.gitee.sop.sdk.response.ErrorResponse;
/**
* @author tanghc
* @author 六如
*/
public enum SopSdkErrors {
/**

View File

@@ -13,7 +13,7 @@ import java.io.Serializable;
/**
* 文件上传类
* @author tanghc
* @author 六如
*/
@Getter
@Setter

View File

@@ -1,7 +1,7 @@
package com.gitee.sop.sdk.exception;
/**
* @author tanghc
* @author 六如
*/
public class SdkException extends RuntimeException {

View File

@@ -3,7 +3,7 @@ package com.gitee.sop.sdk.model;
import lombok.Data;
/**
* @author tanghc
* @author 六如
*/
@Data
public class DemoFileUploadModel {

View File

@@ -4,7 +4,7 @@ import lombok.Data;
/**
* Oauth2认证参数
* @author tanghc
* @author 六如
*/
@Data
public class OpenAuthTokenAppModel {

View File

@@ -32,7 +32,7 @@ import java.util.Map;
*
* @param <T> 对应的Response对象
*
* @author tanghc
* @author 六如
*/
public abstract class BaseRequest<T extends BaseResponse> {

View File

@@ -3,7 +3,7 @@ package com.gitee.sop.sdk.request;
import com.gitee.sop.sdk.response.CommonResponse;
/**
* @author tanghc
* @author 六如
*/
public class CommonRequest extends BaseRequest<CommonResponse> {

View File

@@ -3,7 +3,7 @@ package com.gitee.sop.sdk.request;
import com.gitee.sop.sdk.response.DemoFileUploadResponse;
/**
* @author tanghc
* @author 六如
*/
public class DemoFileUploadRequest extends BaseRequest<DemoFileUploadResponse> {
@Override

View File

@@ -3,7 +3,7 @@ package com.gitee.sop.sdk.request;
import com.gitee.sop.sdk.response.OpenAuthTokenAppResponse;
/**
* @author tanghc
* @author 六如
*/
public class OpenAuthTokenAppRequest extends BaseRequest<OpenAuthTokenAppResponse> {
@Override

View File

@@ -16,7 +16,7 @@ import lombok.Setter;
* },
* "sign": "ERITJKEIJKJHKKKKKKKHJEREEEEEEEEEEE"
* }
* @author tanghc
* @author 六如
*/
@Setter
@Getter

View File

@@ -1,7 +1,7 @@
package com.gitee.sop.sdk.response;
/**
* @author tanghc
* @author 六如
*/
public class CommonResponse extends BaseResponse {

View File

@@ -7,7 +7,7 @@ import java.util.ArrayList;
import java.util.List;
/**
* @author tanghc
* @author 六如
*/
@Data
@EqualsAndHashCode(callSuper = false)

View File

@@ -1,7 +1,7 @@
package com.gitee.sop.sdk.response;
/**
* @author tanghc
* @author 六如
*/
public class ErrorResponse extends BaseResponse {
}

View File

@@ -4,7 +4,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @author tanghc
* @author 六如
*/
@Data
@EqualsAndHashCode(callSuper = false)

View File

@@ -22,7 +22,7 @@ import java.util.HashMap;
import java.util.Map;
/**
* @author tanghc
* @author 六如
*/
public class ClassUtil {

View File

@@ -9,7 +9,7 @@ import java.io.InputStream;
/**
* 文件工具类
* @author tanghc
* @author 六如
*/
public class FileUtil {

View File

@@ -2,7 +2,7 @@ package com.gitee.sop.sdk.util;
/**
* hex工具类
* @author tanghc
* @author 六如
*/
public class HexUtil {
private static final String ZERO = "0";

View File

@@ -4,7 +4,7 @@ import java.security.MessageDigest;
/**
* MD5工具类
* @author tanghc
* @author 六如
*/
public class MD5Util {
@@ -12,7 +12,7 @@ public class MD5Util {
/**
* 生成md5,全部大写
*
*
* @param input
* @return
*/
@@ -22,7 +22,7 @@ public class MD5Util {
/**
* 生成md5,全部大写
*
*
* @param input
* @return
*/
@@ -32,7 +32,7 @@ public class MD5Util {
/**
* 生成md5,全部小写
*
*
* @param input
* @return
*/
@@ -42,7 +42,7 @@ public class MD5Util {
}
return encrypt(input.getBytes());
}
/**
* 返回长度16串,小写
* @param input
@@ -54,7 +54,7 @@ public class MD5Util {
/**
* 生成md5,全部小写
*
*
* @param input
* @return
*/
@@ -75,7 +75,7 @@ public class MD5Util {
}
}
/*public static void main(String[] args) {
System.out.println(encrypt(encrypt("123456")));
}*/