class JobService {

  public boolean delete(String id) throws Exception {
    LOG.info("delete jobs by id {}", id);
    try (SqlSession sqlSession = MyBatisUtil.getSqlSession()) {
      JobMapper jobMapper = sqlSession.getMapper(JobMapper.class);
      jobMapper.deleteByPrimaryKey(id);
      sqlSession.commit();
    } catch (Exception e) {
      LOG.error(e.getMessage(), e);
      throw new Exception(e);
    }
    return true;
  }

}