This commit is contained in:
egzosn
2021-02-24 22:49:09 +08:00
parent 1b1db0f321
commit 3e98301f6d
46 changed files with 80 additions and 73 deletions

View File

@@ -7,7 +7,7 @@ import java.util.concurrent.locks.Lock;
/**
* 支付基础配置存储
*
* @author: egan
* @author egan
* <pre>
* email egzosn@gmail.com
* date 2017/3/5 20:33

View File

@@ -31,7 +31,7 @@ import com.egzosn.pay.common.util.str.StringUtils;
/**
* 支付基础服务
*
* @author: egan
* @author egan
* <pre>
* email egzosn@gmail.com
* date 2017/3/5 20:36

View File

@@ -21,7 +21,7 @@ import java.util.Map;
/**
* 回调,可用于类型转换
* @author: egan
* @author egan
* <pre>
* email egzosn@gmail.com
* date 2017/3/7 18:55

View File

@@ -3,8 +3,10 @@ package com.egzosn.pay.common.bean;
/**
* 账单类型
* @author Egan
* @email egzosn@gmail.com
* @date 2021/2/22
* <pre>
* email egzosn@gmail.com
* date 2021/2/22
* </pre>
*/
public interface BillType {
/**

View File

@@ -18,7 +18,7 @@
package com.egzosn.pay.common.bean;
/**
* @author: egan
* @author egan
* <pre>
* email egzosn@gmail.com
* date 2017/2/7 9:52

View File

@@ -6,7 +6,7 @@ import java.util.*;
/**
* 签名类型
*
* @author: egan
* @author egan
* <pre>
* email egzosn@gmail.com
* date 2019/12/08 13:30

View File

@@ -5,7 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.egzosn.pay.common.bean.PayOutMessage;
/**
* @author: egan
* @author egan
* <pre>
* email egzosn@gmail.com
* date 2017/1/13 14:30

View File

@@ -19,7 +19,7 @@ package com.egzosn.pay.common.bean.result;
/**
* 支付异常
* @author: egan
* @author egan
* <pre>
* email egzosn@gmail.com
* date 2017/3/7 12:32

View File

@@ -39,7 +39,7 @@ import com.egzosn.pay.common.util.str.StringUtils;
/**
* 一个HTTP请求的客户端
*
* @author: egan
* @author egan
* <pre>
* email egzosn@gmail.com
* date 2017/3/4 17:56

View File

@@ -7,7 +7,7 @@ import java.io.*;
/**
* HTTP 配置
* @author: egan
* @author egan
* <pre>
* email egzosn@gmail.com
* date 2017/3/3 20:48

View File

@@ -36,7 +36,7 @@ import java.util.Map;
/**
* http请求工具
* @author: egan
* @author egan
* <code>
* email egzosn@gmail.com <br>
* date 2017/3/3 21:33

View File

@@ -125,7 +125,7 @@ public class XML {
*/
public static <T> T toBean(String content, Class<T> clazz) {
if (null == content || "".equals(content)) {
if (StringUtils.isEmpty(content)) {
return null;
}
try (InputStream in = new ByteArrayInputStream(content.getBytes("UTF-8"))) {
@@ -207,9 +207,8 @@ public class XML {
* @param clazz 需要转化的类
* @param <T> 类型
* @return 对应的对象
* @throws IOException xml io转化异常
*/
public static <T> T inputStream2Bean(InputStream in, Class<T> clazz) throws IOException {
public static <T> T inputStream2Bean(InputStream in, Class<T> clazz) {
JSON json = toJSONObject(in);
return json.toJavaObject(clazz);
}
@@ -220,7 +219,7 @@ public class XML {
* @return 整理完成的参数集
* @throws IOException xml io转化异常
*/
public static Map inputStream2Map(InputStream in, Map m) throws IOException {
public static Map<String, Object> inputStream2Map(InputStream in, Map<String, Object> m) throws IOException {
if (null == m) {
m = new JSONObject();
}
@@ -351,10 +350,10 @@ public class XML {
private static void object2Xml(Object value, Document document, org.w3c.dom.Element element) {
if (value instanceof Map) {
map2Xml((Map) value, document, element);
map2Xml((Map<String, Object>) value, document, element);
}
else if (value instanceof List) {
List vs = (List) value;
List<Object> vs = (List<Object>) value;
for (Object v : vs) {
object2Xml(v, document, element);
}