class ModulesServiceImpl extends SonicServiceImpl<ModulesMapper, Modules> implements ModulesService {

    @Autowired
    private ModulesMapper modulesMapper;
    @Autowired
    private ElementsService elementsService;
    @Autowired
    private TestCasesService testCasesService;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean delete(int id) {<FILL_FUNCTION_BODY>}

    @Override
    public List<Modules> findByProjectId(int projectId) {
        return lambdaQuery().eq(Modules::getProjectId, projectId).list();
    }

    @Override
    public Modules findById(int id) {
        return modulesMapper.selectById(id);
    }

    @Override
    public boolean deleteByProjectId(int projectId) {
        return baseMapper.delete(new LambdaQueryWrapper<Modules>().eq(Modules::getProjectId, projectId)) > 0;
    }
}

        int i = modulesMapper.deleteById(id);
        elementsService.updateEleModuleByModuleId(id);
        testCasesService.updateTestCaseModuleByModuleId(id);
        return i > 0;
    
<methods>public non-sealed void <init>() ,public boolean save(org.cloud.sonic.controller.models.domain.Modules) <variables>