use of com.cas.sim.tis.mapper.CatalogMapper in project TeachingInSimulation by ScOrPiOzzy.
the class CatalogServiceImpl method findCatalogsByParentId.
@Override
public List<Catalog> findCatalogsByParentId(Integer rid) {
Condition condition = new Condition(Catalog.class);
Criteria criteria = condition.createCriteria();
criteria.andEqualTo("rid", rid);
criteria.andEqualTo("del", 0);
CatalogMapper catalogMapper = (CatalogMapper) mapper;
catalogMapper.selectByCondition(condition);
List<Catalog> catalogs = null;
try {
catalogs = catalogMapper.selectByCondition(condition);
LOG.debug("查询到子节点数量:{}", catalogs.size());
} catch (Exception e) {
LOG.error("查询ID{}下子节点失败!", rid);
catalogs = Collections.emptyList();
}
return catalogs;
}
Aggregations