class GroupDao extends BaseDao {

    public List<DasGroup> getGroupsByUserId(Long user_id) throws SQLException {
        String sql = "select t1.id, t1.group_name, t1.group_comment, t1.update_user_no, t1.insert_time from dal_group t1 " +
                "INNER JOIN user_group t2 on t1.id = t2.group_id " +
                "where t2.user_id = ? and t1.id != " + PermissionService.getADMINGROUPID() + " order by group_name";
        return this.queryBySql(sql, DasGroup.class, Parameter.integerOf(StringUtils.EMPTY, user_id));
    }

}