1:建表
package com.whty.common.util;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang.StringUtils;
import com.whty.common.annotation.Verif;
public class InterfaceClient {
public static String url = UrlUtil.URL;
public static String appKey = UrlUtil.APPKEY;
public static String appSecret = UrlUtil.APPSECRET;
public static String messageFormat = UrlUtil.MESSAGEFORMAT;
public static String v = UrlUtil.INTERFACE_V;
public static String timeoutStr = UrlUtil.TIMEOUT;
private static Object obj;
private static String method;
public static String result = "";
/**
* 调用接口
* @param obj 请求对象参数
* @param method 请求的接口名
* @return
*/
public static String interfaceClient(Object object,String methodName){
setMethod(methodName);
setObj(object);
int timeout = getTimeOut(methodName);
Runnable rb=new Runnable() {
@Override
public void run() {
InterfaceClient ic=new InterfaceClient();
ic.dosth();//调用外部接口
}
};
try {