Commit 886846092176be77c79e90546986a65f0af904c6

Authored by yangfei
1 parent dab1bfbb2b

服务同步方法修改

Showing 1 changed file with 7 additions and 2 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SyncDataController.java View file @ 8868460
... ... @@ -95,11 +95,16 @@
95 95 baseResponse = (BaseResponse) ReflectionUtils.invokeMethod(mh, webApplicationContext.getBean(action), synForm);
96 96 }else{//无参数
97 97 Method mh = ReflectionUtils.findMethod(webApplicationContext.getBean(action).getClass(), method, null);
98   - baseResponse = (BaseResponse) ReflectionUtils.invokeMethod(mh, webApplicationContext.getBean(action), null);
  98 + if(mh!=null){
  99 + baseResponse = (BaseResponse) ReflectionUtils.invokeMethod(mh, webApplicationContext.getBean(action), null);
  100 + }else{
  101 + baseResponse.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR);
  102 + baseResponse.setErrormsg("没有找到:"+action+",中的:"+method+"方法!请确认传入参数");
  103 + return baseResponse;
  104 + }
99 105 }
100 106 return baseResponse;
101 107 } catch (Exception e) {
102   - e.printStackTrace();
103 108 BaseResponse baseResponse = new BaseResponse();
104 109 baseResponse.setObject(e.getMessage());
105 110 baseResponse.setErrorcode(ErrorCodeConstants.SYSTEM_ERROR);