statistics_api.yml 1.6 KB
name: 订单统计
base_url: ${ENV(base_url)}
variables:
    currtime: ${make_time()}
    uuid: ${make_uuid()}
    var_access_token: ${get_accesstoken()}
    sign: ${make_sign($currtime, $uuid, $var_access_token)}
    todayIntentionQuantity: ${get_todayIntentionQuantity_from_database(order)}
    todayIntentionMoney: ${get_todayIntentionMoney_from_database(order)}
    todayRealQuantity: ${get_todayRealQuantity_from_database(order)}
    todayRealMoney: ${get_todayRealMoney_from_database(order)}
    cumulativeQuantity: ${get_cumulativeQuantity_from_database(order)}
    cumulativeMoney: ${get_cumulativeMoney_from_database(order)}
    msg: 成功
request:
    headers:
        Content-Type: application/json;charset=utf-8
        User-Agent: okhttp/3.12.3
        X-MMM-AccessToken: $var_access_token
        X-MMM-AppName: com.mmm.ability
        X-MMM-AppProject: ability
        X-MMM-DeviceType: '1'
        X-MMM-Sign: $sign
        X-MMM-Timestamp: $currtime
        X-MMM-Uuid: $uuid
        X-MMM-Version: 0.4.0
    json:
    method: POST
    url: v1/order/statistics
validate:
    -   eq:
        - content.msg
        - $msg
    - eq:
      - content.data.statistics.cumulativeMoney
      - $cumulativeMoney
    - eq:
      - content.data.statistics.cumulativeQuantity
      - $cumulativeQuantity
    - eq:
      - content.data.statistics.todayIntentionMoney
      - $todayIntentionMoney
    - eq:
      - content.data.statistics.todayIntentionQuantity
      - $todayIntentionQuantity
    - eq:
      - content.data.statistics.todayRealMoney
      - $todayRealMoney
    - eq:
      - content.data.statistics.todayRealQuantity
      - $todayRealQuantity