@Test public void testFindByPid() { BackCategory bc2 = create("一级类目1", 1, 0L); backCategoryDao.create(bc2); List<BackCategory> children = backCategoryDao.findByPid(0L); assertThat(children).isNotEmpty().hasSize(2); }
public List<BackCategory> findByPid(Long pid) { return getSqlSession().selectList(sqlId("findByPid"), pid); }
BackCategoryDAO extends MyBatisDAO<BackCategory> { public List<BackCategory> findByPid(Long pid) { return getSqlSession().selectList(sqlId("findByPid"), pid); } }
BackCategoryDAO extends MyBatisDAO<BackCategory> { public List<BackCategory> findByPid(Long pid) { return getSqlSession().selectList(sqlId("findByPid"), pid); }  }
BackCategoryDAO extends MyBatisDAO<BackCategory> { public List<BackCategory> findByPid(Long pid) { return getSqlSession().selectList(sqlId("findByPid"), pid); }  List<BackCategory> findByPid(Long pid); }
BackCategoryDAO extends MyBatisDAO<BackCategory> { public List<BackCategory> findByPid(Long pid) { return getSqlSession().selectList(sqlId("findByPid"), pid); }  List<BackCategory> findByPid(Long pid);  }