@Test public void getCountByName() throws Exception { Long count = appGroupDao.getCountByName("张三"); System.out.println("getCountByName :-------> " + count); Assert.assertTrue(count > 0); }
public Long getCountByName(String name) throws SQLException { String sql = "SELECT count(1) FROM app_group WHERE name='" + name + "'"; return this.getCount(sql); }
AppGroupDao extends BaseDao { public Long getCountByName(String name) throws SQLException { String sql = "SELECT count(1) FROM app_group WHERE name='" + name + "'"; return this.getCount(sql); } }
AppGroupDao extends BaseDao { public Long getCountByName(String name) throws SQLException { String sql = "SELECT count(1) FROM app_group WHERE name='" + name + "'"; return this.getCount(sql); }  }
AppGroupDao extends BaseDao { public Long getCountByName(String name) throws SQLException { String sql = "SELECT count(1) FROM app_group WHERE name='" + name + "'"; return this.getCount(sql); }  Long insertAppGroup(AppGroup appGroup); AppGroup getAppGroupById(Long id); int updateAppGroup(AppGroup appGroup); int deleteAppGroup(AppGroup appGroup); Long getCountByName(String name); Long getCountByIdAndName(Long id, String name); int changeServerGroup(Long newServerGroupId, Set<Long> appGroupIds); List<AppGroup> getAppGroupsByServerGroupId(Long serverGroupId); Long getAppGroupTotalCount(Paging<AppGroup> paging); List<AppGroupView> findAppGroupPageList(Paging<AppGroup> paging); }
AppGroupDao extends BaseDao { public Long getCountByName(String name) throws SQLException { String sql = "SELECT count(1) FROM app_group WHERE name='" + name + "'"; return this.getCount(sql); }  Long insertAppGroup(AppGroup appGroup); AppGroup getAppGroupById(Long id); int updateAppGroup(AppGroup appGroup); int deleteAppGroup(AppGroup appGroup); Long getCountByName(String name); Long getCountByIdAndName(Long id, String name); int changeServerGroup(Long newServerGroupId, Set<Long> appGroupIds); List<AppGroup> getAppGroupsByServerGroupId(Long serverGroupId); Long getAppGroupTotalCount(Paging<AppGroup> paging); List<AppGroupView> findAppGroupPageList(Paging<AppGroup> paging);  }