|
@ -177,6 +177,8 @@ public class Controler { |
|
|
action.put("key", method.getName()); |
|
|
action.put("key", method.getName()); |
|
|
action.put("name", actionAnnotation.name()); |
|
|
action.put("name", actionAnnotation.name()); |
|
|
action.put("group", actionAnnotation.group()); |
|
|
action.put("group", actionAnnotation.group()); |
|
|
|
|
|
// action.put("order", actionAnnotation.order()); |
|
|
|
|
|
// action.put("newline", actionAnnotation.newline()); |
|
|
|
|
|
|
|
|
var actionParams = new ArrayList<Map<String,Object>>(); |
|
|
var actionParams = new ArrayList<Map<String,Object>>(); |
|
|
var actionParamList = method.getParameters(); |
|
|
var actionParamList = method.getParameters(); |
|
@ -224,7 +226,7 @@ public class Controler { |
|
|
|
|
|
|
|
|
@PostMapping("/api/service-config/service-action-exec") |
|
|
@PostMapping("/api/service-config/service-action-exec") |
|
|
@ResponseBody |
|
|
@ResponseBody |
|
|
public AppRet<Object> serviceActionExecute( @RequestBody Map<String, Object> params ) throws Exception { |
|
|
|
|
|
|
|
|
public AppRet<Object> serviceActionExecute( @RequestBody Map<String, Object> params ) throws Throwable { |
|
|
String serviceKey = (String)params.get("serviceKey"); |
|
|
String serviceKey = (String)params.get("serviceKey"); |
|
|
Class<?> serviceClass = null; |
|
|
Class<?> serviceClass = null; |
|
|
var classes = UfClassHelper.getAllClassesInPackage("a8k"); |
|
|
var classes = UfClassHelper.getAllClassesInPackage("a8k"); |
|
@ -261,16 +263,19 @@ public class Controler { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var service = UfApplication.getContext().getBean(serviceClass); |
|
|
var service = UfApplication.getContext().getBean(serviceClass); |
|
|
|
|
|
try { |
|
|
if ( method.getReturnType().equals(Void.TYPE) ) { |
|
|
if ( method.getReturnType().equals(Void.TYPE) ) { |
|
|
method.invoke(service, actionParams.toArray()); |
|
|
method.invoke(service, actionParams.toArray()); |
|
|
return AppRet.success(); |
|
|
return AppRet.success(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
var actionResult = method.invoke(service, actionParams.toArray()); |
|
|
var actionResult = method.invoke(service, actionParams.toArray()); |
|
|
if ( actionResult instanceof AppRet ) { |
|
|
if ( actionResult instanceof AppRet ) { |
|
|
return (AppRet)actionResult; |
|
|
return (AppRet)actionResult; |
|
|
} |
|
|
} |
|
|
return AppRet.success(actionResult); |
|
|
return AppRet.success(actionResult); |
|
|
|
|
|
} catch ( InvocationTargetException e ) { |
|
|
|
|
|
throw e.getTargetException(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@PostMapping("/api/service-config/class-struct-info-get") |
|
|
@PostMapping("/api/service-config/class-struct-info-get") |
|
|