/** * @param username * @return 判定是否存在username */ public int checkUsername(Map<String, String> map) { String hql = "select count(*) from " + map.get("model").toString() + " where 1=1"; if (map.containsKey("username")) { hql += " and username = '******'"; } int result = baseDao.getTotalCountByHql(hql, map); return result; }
/** * @param args * @return 获取数量 */ public int listCount(Map<String, String> map) { String hql = "select count(*) from " + map.get("model").toString() + " where 1=1"; if (map.containsKey("uid")) { hql += " and orgId = " + map.get("orgId").toString(); } int result = baseDao.getTotalCountByHql(hql, map); return result; }