function getValues(args, fieldsMap = {}, url) {
  const fields = Object.keys(fieldsMap)
  const values = {}
  for (let i = 0; i < fields.length; i++) {
    const field = fields[i]
    let type_ = TYPE_STRING
    let defValue
    let required = false
    const attributes = fieldsMap[field]
    if (typeof (attributes) === TYPE_STRING) {
      type_ = attributes
    } else {
      type_ = attributes.type || TYPE_STRING
      defValue = attributes.default
      required = attributes.required
    }
    if (!typeUtil.isValidType(type_)) {
      throw new ArgsError(`invalid type [${type_}] in fieldsMap ${fieldsMap}`)
    }

    let value = args[field]
    if (required && (value === '' || value === undefined || value === null)) {
      log4js.error('request [%s] arg [%s] missing, attributes: %s', url, field, JSON.stringify(attributes))
      throw new ArgsError(`${field} is missing, but it is required!`)
    }

    if (defValue !== undefined && (value === '' || value === undefined || value === null)) {
      if (typeof (defValue) === 'function') {
        value = defValue()
      } else {
        value = defValue
      }
    }

    if (value === undefined) {
      continue
    }

    const { ok, value: newValue } = checkValueType(value, type_)
    if (!ok) {
      log4js.error('request [%s] arg [%s] invalid', url, field)
      throw new ArgsError(`type of '${field}' is invalid`)
    }
    value = newValue

    if (attributes.enums && typeUtil.isArray(attributes.enums)) {
      if (_.indexOf(attributes.enums, value) === -1) { // value not in enums.
        throw new ArgsError(`value of '${field}' is invalid, must be any of ${attributes.enums}`)
      }
    }

    values[field] = value
  }
  return values
}
build a values params for sequence from request args.
@param {object} args http request arguments
@param {object} fieldsMap {field: 'integer', field2: {type: 'string', default: 'test', enums: ['test','foo','bar']}, field3: {type: 'integer', required: true}}
     support types: object, array, string, integer, float, boolean
@param {string} url request url, used for debug.
@return {object} values, the values params for sequence query or update.