@Test public void deleteServerAndServerConfigByServerId() throws Exception { Long id = 1L; int _id = serverDao.deleteServerAndServerConfigByServerId(id); System.out.println("deleteServerAndServerConfigByServerId :-------> " + _id); Assert.assertTrue(_id > 0); }
public int deleteServerAndServerConfigByServerId(Long serverId) throws SQLException { String sql = "DELETE t1, t2 from `server` t1 " + "left join `server_config` t2 on t1.id = t2.server_id " + "where t1.id = " + serverId; return this.updataBysql(sql); }
ServerDao extends BaseDao { public int deleteServerAndServerConfigByServerId(Long serverId) throws SQLException { String sql = "DELETE t1, t2 from `server` t1 " + "left join `server_config` t2 on t1.id = t2.server_id " + "where t1.id = " + serverId; return this.updataBysql(sql); } }
ServerDao extends BaseDao { public int deleteServerAndServerConfigByServerId(Long serverId) throws SQLException { String sql = "DELETE t1, t2 from `server` t1 " + "left join `server_config` t2 on t1.id = t2.server_id " + "where t1.id = " + serverId; return this.updataBysql(sql); }  }
ServerDao extends BaseDao { public int deleteServerAndServerConfigByServerId(Long serverId) throws SQLException { String sql = "DELETE t1, t2 from `server` t1 " + "left join `server_config` t2 on t1.id = t2.server_id " + "where t1.id = " + serverId; return this.updataBysql(sql); }  Server getServerById(Long id); Long insertServer(Server server); int updateServer(Server server); int deleteServer(Server server); int deleteServerAndServerConfigByServerId(Long serverId); boolean isNotExistByIpAndPort(Server server); int deleteServerByServerGroupId(Long serverGroupId); int changeServerGroup(long serverId, long serverGroupId); List<Server> getServersByServerGroupId(Long serverGroupId); Long getServerTotalCount(Paging<Server> paging); List<ServerView> findServerPageList(Paging<Server> paging); }
ServerDao extends BaseDao { public int deleteServerAndServerConfigByServerId(Long serverId) throws SQLException { String sql = "DELETE t1, t2 from `server` t1 " + "left join `server_config` t2 on t1.id = t2.server_id " + "where t1.id = " + serverId; return this.updataBysql(sql); }  Server getServerById(Long id); Long insertServer(Server server); int updateServer(Server server); int deleteServer(Server server); int deleteServerAndServerConfigByServerId(Long serverId); boolean isNotExistByIpAndPort(Server server); int deleteServerByServerGroupId(Long serverGroupId); int changeServerGroup(long serverId, long serverGroupId); List<Server> getServersByServerGroupId(Long serverGroupId); Long getServerTotalCount(Paging<Server> paging); List<ServerView> findServerPageList(Paging<Server> paging);  }