public static <T> boolean getLongParamValue(T paramCntr, WebFieldDef fieldDef,
            boolean required, long defValue,
            StringBuilder sBuffer, ProcessResult result) {
        if (!getStringParamValue(paramCntr, fieldDef,
                required, null, sBuffer, result)) {
            return result.isSuccess();
        }
        String paramValue = (String) result.getRetData();
        if (paramValue == null) {
            result.setSuccResult(defValue);
            return result.isSuccess();
        }
        try {
            long paramIntVal = Long.parseLong(paramValue);
            result.setSuccResult(paramIntVal);
        } catch (Throwable e) {
            result.setFailResult(sBuffer.append("Parameter ").append(fieldDef.name)
                    .append(" parse error: ").append(e.getMessage()).toString());
            sBuffer.delete(0, sBuffer.length());
        }
        return result.isSuccess();
    }
Parse the parameter value from an object value to a long value

@param paramCntr   parameter container object
@param fieldDef   the parameter field definition
@param required   a boolean value represent whether the parameter is must required
@param defValue   a default value returned if the field not exist
@param sBuffer     string buffer
@param result     process result of parameter value
@return process result
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/common/utils/WebParameterUtils.java