소스 검색

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

szjbdgzl 2 년 전
부모
커밋
e0b93a0d02
1개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 10 2
      ibps-common-root/modules/org-biz/src/main/java/com/lc/ibps/common/cat/repository/impl/TypeRepositoryImpl.java

+ 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;
 	}