class DeptService extends BaseService<Dept,Long,DeptRepository> {

    public void deleteDept(Long deptId) {
        Dept dept = get(deptId);

        List<Dept> subDepts = deptRepository.findByPidsLike("%[" + dept.getId() + "]%");
        deptRepository.deleteAll(subDepts);
        deptRepository.delete(dept);
    }

}

class DeptServiceTest extends BaseService<Dept,Long,DeptRepository> {

    @Autowired
    private DeptService deptService;

    @Test
    public void deleteDept() throws Exception {


    }

}

class DeptServiceTest extends BaseService<Dept,Long,DeptRepository> {

    @Autowired
    private DeptService deptService;

    @Test
    public void deleteDept() throws Exception {

    }

}