class SysDeptRestApi {

  @DELETE
  @Path("/deleteBatch")
  @SubmarineApi
  public Response deleteBatch(@QueryParam("ids") String ids) {
    LOG.info("deleteBatch({})", ids.toString());
    try (SqlSession sqlSession = MyBatisUtil.getSqlSession()) {
      SysDeptMapper sysDeptMapper = sqlSession.getMapper(SysDeptMapper.class);
      sysDeptMapper.deleteBatch(Arrays.asList(ids.split(",")));
      sqlSession.commit();
    } catch (Exception e) {
      LOG.error(e.getMessage(), e);
      return new JsonResponse.Builder<>(Response.Status.OK)
          .message("Batch delete department failed!").success(false).build();
    }

    return new JsonResponse.Builder<>(Response.Status.OK)
        .message("Batch delete department successfully!").success(true).build();
  }

  @Inject public  SysDeptRestApi();

}