|
|
@@ -55,21 +55,15 @@ public class ExportService {
|
|
|
List list = null;
|
|
|
try {
|
|
|
Class interfz = Class.forName(constant.getInterfz());
|
|
|
- Object instance;
|
|
|
+ Object instance = Proxy.newProxyInstance(interfz.getClassLoader(),new Class[]{interfz} ,new MesProxy(sqlSession.getMapper(interfz)));
|
|
|
Method selectMethod;
|
|
|
- if (constant.getInterfz().endsWith("Feign")){
|
|
|
- instance = ApplicationContextUtil.getBean(interfz);
|
|
|
+ // 查询条件是map
|
|
|
+ if(constant.getMapFlag()){
|
|
|
selectMethod = instance.getClass().getDeclaredMethod(constant.getMethod(),Map.class);
|
|
|
- } else {
|
|
|
- instance = Proxy.newProxyInstance(interfz.getClassLoader(),new Class[]{interfz} ,new MesProxy(sqlSession.getMapper(interfz)));
|
|
|
+ }else{
|
|
|
selectMethod = instance.getClass().getDeclaredMethod(constant.getMethod(),Object.class);
|
|
|
}
|
|
|
- if (constant.getInterfz().endsWith("Feign")){
|
|
|
- ResponseResultVO<PageList> resultVO = (ResponseResultVO<PageList>) selectMethod.invoke(instance, param);
|
|
|
- list = (resultVO).getData().getList();
|
|
|
- } else {
|
|
|
- list = (List)selectMethod.invoke(instance,param);
|
|
|
- }
|
|
|
+ list = (List)selectMethod.invoke(instance,param);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|