class ProjectService {

  public boolean delete(String id) throws Exception {
    LOG.info("delete({})", id);
    try (SqlSession sqlSession = MyBatisUtil.getSqlSession()) {
      ProjectMapper projectMapper = sqlSession.getMapper(ProjectMapper.class);
      projectMapper.deleteByPrimaryKey(id);

      ProjectFilesMapper projectFilesMapper = sqlSession.getMapper(ProjectFilesMapper.class);
      ProjectFiles projectFiles = new ProjectFiles();
      projectFiles.setProjectId(id);
      projectFilesMapper.deleteSelective(projectFiles);
      sqlSession.commit();
    } catch (Exception e) {
      LOG.error(e.getMessage(), e);
      throw new Exception(e);
    }
    return true;
  }

}