## 格式

- int 32 位
- long 64 位

| <img width=300px/></br>字段名 | <img width=180px/></br>类型 | <img width=400px/></br>说明    | <img width=200px/></br>例子     |
|:------------------------:| ----------------------- | -------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| appStoreLogId            | string                  | 广告匹配日志id                                           | 157dd3ac-a26a-4ac8-a92c-d01376bf4cd5                                                     |
| batchLogId               | string                  | 请求ID，标识一次请求                                        | 239410ed-01b5-409a-9324-7211c0fcaa52                                                     |
| referLogId               | string                  | trace 日志ID                                         | 239410ed-01b5-409a-9324-7211c0fcaa52                                                     |
| originAdsourceId         | string                  | URL中的参数 original，具体不明                              |                                                                                          |
| matchOrder               | int                     | 原来有其他用途，后来改为当前服务器IP的整数形式                           |                                                                                          |
| appId                    | long                    | appid                                              | 19641                                                                                    |
| sourcePorductId          | string                  | 广告 product id                                      | 000000798071                                                                             |
| sourceAppId              | string                  | 包名                                                 | com.Qunar                                                                                |
| creativeClickUrl         | string                  | 创意的点击跳转地址                                          | samsungapps://PromotionDetail/1000000972                                                 |
| campaignId               | long                    | 活动 ID                                              | 23354                                                                                    |
| strategyId               | long                    | 策略 ID                                              | 59192                                                                                    |
| creativeId               | long                    | 创意 ID                                              | 42386                                                                                    |
| mediaId                  | long                    | 流量媒体 ID                                            |                                                                                          |
| adPosId                  | long                    |                                                    | 351                                                                                      |
| strategyPrice            | long                    | 竞价价格值                                              |                                                                                          |
| dealPrice                | long                    | 竞价价格值                                              | 63000                                                                                    |
| payPrice                 | long                    | 广告匹配无值，广告通知才有值                                     | 63000                                                                                    |
| encodeAdsource           | string                  | 广告匹配的adsource                                      |                                                                                          |
| decodeAdsource           | string                  | 广告通知里记录的url参数中的adsource                            |                                                                                          |
| logType                  | int                     | 日志类型，1 匹配；2 展示；3 action(点击、下载或安装、等等其他类型)           |                                                                                          |
| matchType                | int                     | 广告匹配类型，1 普通；2 搜索。                                  |                                                                                          |
| isMatched                | int                     | 是否成功匹配到广告，1 成功；0 失败                                |                                                                                          |
| isImpression             | int                     | 日志是否为展示通知                                          |                                                                                          |
| isClick                  | int                     | 日志是否为点击通知                                          |                                                                                          |
| actionType               | int                     | 日志是否为其他事件通知，即url路径为 store/action                   |                                                                                          |
| isHome                   | int                     | 日志是否为进入主页通知                                        |                                                                                          |
| isDownload               | int                     | 日志是否为下载通知                                          |                                                                                          |
| isInstall                | int                     | 日志是否为安装通知                                          |                                                                                          |
| logTimestamp             | long                    | 时间戳                                                |                                                                                          |
| logDate                  | string                  | 无值                                                 |                                                                                          |
| logTime                  | string                  | 无值                                                 |                                                                                          |
| userIp                   | string                  | 终端 IP                                              |                                                                                          |
| zoneCountry              | string                  | 由终端IP推算的国家名                                        |                                                                                          |
| zoneProvince             | string                  | 由终端IP推算的省份名                                        |                                                                                          |
| zoneCity                 | string                  | 由终端IP推算的城市名                                        |                                                                                          |
| userId                   | string                  | 用户ID                                               | Yjg0OWY1ZTgxYWY5OTc3MzQ0NzRlMjhkYmE0N2Y2MmMzMzIyOTQyZGY3MzM1N2I4NTljNjU5OTdkZmJhNjRiNA== |
| userPhone                | string                  | 无值                                                 |                                                                                          |
| userAgent                | string                  | useragent，即 UA                                     |                                                                                          |
| userOs                   | string                  | 操作系统， url 参数 dos                                   | 33                                                                                       |
| userDeviceBrand          | string                  | 品牌， 参数 db                                          | Samsung                                                                                  |
| userDeviceModel          | string                  | 型号， 参数 dt                                          | SM-C9000                                                                                 |
| userLanguage             | string                  | 参数vc                                               | 4.5.26.2                                                                                 |
| userDisplaySize          | string                  | 分辨率 参数 dis                                         |                                                                                          |
| usernetWork              | string                  | 网络链接方式， 参数 nt                                      |                                                                                          |
| deviceApps               | string                  | 用户手机上已经安装的app列表，url 参数 apps                        |                                                                                          |
| searchKeyWords           | string                  | 用户搜索关键字，或url参数 pkgname                             | 赶走野蜂方法                                                                                   |
| cheatType                | int                     | 匹配广告时，活动有没有匹配到请求时的搜索关键字                            |                                                                                          |
| voucherFlag              | int                     | 是否优先消耗虚拟币（0为现金优先，1为优先虚拟币），取自共享内存里的广告策略             |                                                                                          |
| matchKeyWords            | string                  | 匹配到的平台设置的关键词                                       |                                                                                          |
| reserveInt               | int                     | ctr class                                          |                                                                                          |
| reserveLong              | long                    | 无值                                                 | 0                                                                                        |
| reserveString            | string                  | 切词匹配时候，记录切词信息                                      |                                                                                          |
| oaid                     | string                  |                                                    | 9c7ba72d2f5ce06ac3fa46cd329cac2f957cb0552b505ead22a43e97e155fd58                         |
| imei                     | string                  |                                                    |                                                                                          |
| cost_price               | double                  | 广告 app 配置的 CostRatio                               |                                                                                          |
| from_mediaid             | int                     | from_mediaid 当前广告位是详情页时，该参数指示，详情页由哪个前置广告位带来        |                                                                                          |
| dspEcpm                  | long                    | dsp返回的ecpm，单位做了转换，万分之一元                            |                                                                                          |
| CPM2CPDRatio             | double                  | 我们配置的转换因子                                          |                                                                                          |
| ctr                      | double                  | 预测时的转换率                                            | 0.0045                                                                                   |
| ctrFactor                | double                  | 配置的ctr提升因子                                         | 90                                                                                       |
| adIndex                  | int                     | 同一个广告位中匹配到的创意次序                                    |                                                                                          |
| llmtags                  | string                  | url 参数 llmtags                                     | `野蜂驱赶*方法查询*生活技巧`                                                                         |
| llmapps                  | string                  | url 参数 llmapps                                     | `百度经验*知乎*豆丁网`                                                                            |
| cvr                      | double                  | TODO: 预测时返回的 cvr                                   | 0.000147                                                                                 |
| ocpxstage                | int                     | TODO: ocpx 阶段                                      | 1                                                                                        |
| ecpm                     | double                  | TODO: 最初为zzy预测返回的ecpm，未来可能作它用，注意zzy返回的是单次展示价格，不是千次 | 0.00257                                                                                  |

## schema

- 代码里会用到
  
  ```
  {
    "name" : "appStoreLog",    "type" : "record",
    "fields" : [
        { "name" : "appStoreLogId",         "type" : "string" },
        { "name" : "batchLogId",            "type" : "string" },
        { "name" : "referLogId",            "type" : "string" },
        { "name" : "originAdsourceId",      "type" : "string" },
        { "name" : "matchOrder",            "type" : "int" },
        { "name" : "appId",                 "type" : "long" },
        { "name" : "sourcePorductId",       "type" : "string" },
        { "name" : "sourceAppId",           "type" : "string" },
        { "name" : "creativeClickUrl",      "type" : "string" },
        { "name" : "campaignId",            "type" : "long" },
        { "name" : "strategyId",            "type" : "long" },
        { "name" : "creativeId",            "type" : "long" },
        { "name" : "mediaId",               "type" : "long" },
        { "name" : "adPosId",               "type" : "long" },
        { "name" : "strategyPrice",         "type" : "long" },
        { "name" : "dealPrice",             "type" : "long" },
        { "name" : "payPrice",              "type" : "long" },
        { "name" : "encodeAdsource",        "type" : "string" },
        { "name" : "decodeAdsource",        "type" : "string" },
        { "name" : "logType",               "type" : "int" },
        { "name" : "matchType",             "type" : "int" },
        { "name" : "isMatched",             "type" : "int" },
        { "name" : "isImpression",          "type" : "int" },
        { "name" : "isClick",               "type" : "int" },
        { "name" : "actionType",            "type" : "int" },
        { "name" : "isHome",                "type" : "int" },
        { "name" : "isDownload",            "type" : "int" },
        { "name" : "isInstall",             "type" : "int" },
        { "name" : "logTimestamp",          "type" : "long" },
        { "name" : "logDate",               "type" : "string" },
        { "name" : "logTime",               "type" : "string" },
        { "name" : "userIp",                "type" : "string" },
        { "name" : "zoneCountry",           "type" : "string" },
        { "name" : "zoneProvince",          "type" : "string" },
        { "name" : "zoneCity",              "type" : "string" },
        { "name" : "userId",                "type" : "string" },
        { "name" : "userPhone",             "type" : "string" },
        { "name" : "userAgent",             "type" : "string" },
        { "name" : "userOs",                "type" : "string" },
        { "name" : "userDeviceBrand",       "type" : "string" },
        { "name" : "userDeviceModel",       "type" : "string" },
        { "name" : "userLanguage",          "type" : "string" },
        { "name" : "userDisplaySize",       "type" : "string" },
        { "name" : "usernetWork",           "type" : "string" },
        { "name" : "deviceApps",            "type" : "string" },
        { "name" : "searchKeyWords",        "type" : "string" },
        { "name" : "cheatType",             "type" : "int" },
        { "name" : "voucherFlag",           "type" : "int" },
        { "name" : "matchKeyWords",         "type" : "string" },
        { "name" : "reserveInt",            "type" : "int" },
        { "name" : "reserveLong",           "type" : "long" },
        { "name" : "reserveString",         "type" : "string" },
        { "name" : "oaid",                  "type" : "string" },
        { "name" : "imei",                  "type" : "string" },
        { "name" : "cost_price",            "type" : "double" },
        { "name" : "from_mediaid",          "type" : "int" },
        { "name" : "dspEcpm",               "type" : "long" },
        { "name" : "CPM2CPDRatio",          "type" : "double" },
        { "name" : "ctr",                   "type" : "double" },
        { "name" : "ctrFactor",             "type" : "double" },
        { "name" : "adIndex",               "type" : "int" },
        { "name" : "llmtags",               "type" : "string" },
        { "name" : "llmapps",               "type" : "string" },
        { "name" : "cvr",                   "type" : "double" },
        { "name" : "ocpxstage",             "type" : "int" },
        { "name" : "ecpm",                  "type" : "double" }
    ]
  }
  ```
