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