class UserGroupDao extends BaseDao {

    public List<UserGroup> getUserGroupByGroupIdAndUserId(Long groupId, Long userId) throws SQLException {
        String sql = "SELECT id, user_id, group_id, role, opt_user FROM user_group WHERE group_id = ? AND user_id=?";
        return this.queryBySql(sql, UserGroup.class, Parameter.integerOf(StringUtils.EMPTY, groupId), Parameter.integerOf(StringUtils.EMPTY, userId));
    }

}