model.setLang(lang);
}
//方式二:使用IN语句
@Override
public PropertyCriteria buildPropertyCriteria(){
PropertyCriteria propertyCriteria=new PropertyCriteria();
if(infoTypeId>0){
InfoType obj=getService().retrieve(InfoType.class, infoTypeId);
//获取orgId的所有子机构的ID
List<Integer> infoTypeIds=InfoTypeService.getChildIds(obj);
//加上orgId
infoTypeIds.add(obj.getId());
PropertyEditor pe=new PropertyEditor("infoType.id", Operator.in, PropertyType.List, infoTypeIds);
propertyCriteria.addPropertyEditor(pe);
return propertyCriteria;
}
//infoTypeId==-1或infoTypeId<0代表为根节点,不加过滤条件
return null;