【7.2.5】【scanner】更新扫描资源增加一个业务类型

pull/37/head
fengshuonan 2022-09-28 12:54:53 +08:00
parent 4a44be413b
commit f92d458ff6
2 changed files with 8 additions and 0 deletions

View File

@ -120,6 +120,12 @@ public class ResourceDefinition implements Serializable {
@ChineseDescription("http请求方法")
private String httpMethod;
/**
* 1-2-
*/
@ChineseDescription("资源的业务类型1-系统类型2-业务类型")
private Integer resourceBizType;
/**
*
*/

View File

@ -245,10 +245,12 @@ public class ApiResourceScanner implements BeanPostProcessor {
Boolean requiredLogin = invokeAnnotationMethod(apiResource, "requiredLogin", Boolean.class);
Boolean requiredPermission = invokeAnnotationMethod(apiResource, "requiredPermission", Boolean.class);
Boolean viewFlag = invokeAnnotationMethod(apiResource, "viewFlag", Boolean.class);
Integer resBizType = invokeAnnotationMethod(apiResource, "resBizType", Integer.class);
resourceDefinition.setRequiredLoginFlag(requiredLogin);
resourceDefinition.setRequiredPermissionFlag(requiredPermission);
resourceDefinition.setResourceName(name);
resourceDefinition.setResourceBizType(resBizType);
// 根据控制器和控制器方法的path组装最后的url
String controllerMethodPath = createControllerPath(controllerClass, methodPath[0]);