Browse Source

处理 级联查询参数name首字母大写cascade": [ {"Name": "property"}]

lvxianyun 3 years ago
parent
commit
88183b237a

+ 4 - 0
src/main/java/com/persagy/proxy/adm/service/impl/AbstractAdmBaseServiceImpl.java

@@ -97,6 +97,10 @@ public class AbstractAdmBaseServiceImpl<T> implements IAdmBaseService<T> {
         Map<String, Object> voMap = CollUtil.fieldValueMap(admVOs, BaseEntity.PROP_ID);
         Object simpleVO = admVOs.get(0);
         for(AdmQueryCriteria cascade:cascades) {
+            if(StrUtil.isBlank(cascade.getName())){
+                //处理 级联查询参数name首字母大写cascade": [ {"Name": "property"}]
+                continue;
+            }
             // 获取关联对象的Class
             Field casField = ReflectUtil.getField(simpleVO.getClass(), cascade.getName());
             CascadeColumn annotationInfo = casField.getAnnotation(CascadeColumn.class);