Browse Source

[bug-615]分类设置里菜单菜单排序数据无法获取

szjbdgzl 2 years ago
parent
commit
e0b93a0d02

+ 10 - 2
ibps-common-root/modules/org-biz/src/main/java/com/lc/ibps/common/cat/repository/impl/TypeRepositoryImpl.java

@@ -104,8 +104,16 @@ public class TypeRepositoryImpl extends AbstractRepository<String, TypePo, Type>
 	@Override
 	public List<TypePo> getOwnerByParentId(String id,String diDian) {
 		String currentUserId = currentContext.getCurrentUserId();
-		List<TypePo> typeList = findByKey("getOwnerByParentIdAndUserId", "getIdsOwnerByParentIdAndUserId",
-				b().a("parentId", id).a("userId", currentUserId).a("diDian", "%" + diDian + "%").p());
+		List<TypePo> typeList;
+		if (BeanUtils.isNotEmpty(diDian)){
+			typeList = findByKey("getOwnerByParentIdAndUserId", "getIdsOwnerByParentIdAndUserId",
+					b().a("parentId", id).
+						a("userId", currentUserId).
+						a("diDian", "%" + diDian + "%").p());
+		}else {
+			typeList = findByKey("getOwnerByParentIdAndUserId", "getIdsOwnerByParentIdAndUserId",
+					b().a("parentId", id).a("userId", currentUserId).p());
+		}
 		return typeList;
 	}