protected Object resolveRequestStrParamExt(PlatformRequest platformRequest, MethodParameter methodParam){ VariableList inVl = platformRequest.getVariableList(); String paraName = methodParam.getParameterName(); return inVl.getValueAsObject(paraName); } protected Object resolveRequestParamExt(String miType,PlatformRequest platformRequest, String paramName, String defaultValue,MethodParameter methodParam,NativeWebRequest webRequest, Object handler)throws Exception{ if(StringUtils.isBlank(paramName)){ paramName = defaultValue; } Class<?> paramType = methodParam.getParameterType(); DatasetList inDl = platformRequest.getDatasetList(); VariableList inVl = platformRequest.getVariableList(); if(RequestParamExt.TYPE_DS.equals(miType)){//绑定的关键过程 Dataset ds = inDl.getDataset(paramName); Object vo = paramType.newInstance(); MiPDataBinder dataBinder = new MiPDataBinder(vo, false); dataBinder.bind(inVl); return dataBinder.getTarget(); } } |