koubei.marketing.data.trade.habbit.query(商户会员交易习惯查询接口)JAVA版本demo

说明: 
        商户会员交易习惯查询接口(koubei.marketing.data.trade.habbit.query)可获取会员在商户的消费习惯,包含复购率、桌单价、桌单价智能分析,商户会员交易习惯可帮助商户了解商户会员的消费习惯,以便更好的设置活动(如券门槛等)。 

接口请求示例: 

//koubei.marketing.data.trade.habbit.query(商户会员交易习惯查询接口)     public  static void DataTradeHabbit_Query(){         AlipayClient   alipayClient=alipayclient();         KoubeiMarketingDataTradeHabbitQueryRequest request = new KoubeiMarketingDataTradeHabbitQueryRequest();         request.setBizContent("{" +         "\"biz_date\":\"20180314\"" +         "  }");         KoubeiMarketingDataTradeHabbitQueryResponse response=null;        try {            response = alipayClient.execute(request);            System.out.println(response.getBody());        } catch (AlipayApiException e) {            e.printStackTrace();        }         if(response.isSuccess()){         System.out.println("调用成功");         } else {         System.out.println("调用失败");         }     }}

接口同步返回示例: 

{    "koubei_marketing_data_trade_habbit_query_response": {        "code": "10000",        "msg": "Success",        "trade_habit_info": "[{\"trade_user_cnt_7d\":\"24\",\"trade_user_cnt_active_30d\":\"20\",\"zdj_order_amt_distribution_90d\":\"0-5:0.9737,5-10:0,10-15:0.0088,15-20:0,20-25:0,25及以上:0.0175\",\"trade_user_cnt_90d\":\"80\",\"zdj_order_amt_distribution_60d\":\"0-5:0.9737,5-10:0,10-15:0.0088,15-20:0,20-25:0,25及以上:0.0175\",\"zdj_service_amt_distribution_90d\":\"0-5:0.9737,5-10:0,10-15:0.0088,15-20:0,20-25:0,25及以上:0.0175\",\"zdj_order_amt_distribution_30d\":\"0-5:0.9737,5-10:0,10-15:0.0088,15-20:0,20-25:0,25及以上:0.0175\",\"trade_user_cnt_60d\":\"64\",\"trade_user_cnt_30d\":\"39\",\"zdj_order_amt_distribution_7d\":\"0-5:0.9733,5-10:0,10-15:0.0133,15-20:0,20-25:0,25及以上:0.0133\",\"zdj_service_amt_distribution_30d\":\"0-5:0.9737,5-10:0,10-15:0.0088,15-20:0,20-25:0,25及以上:0.0175\",\"zdj_service_amt_distribution_60d\":\"0-5:0.9737,5-10:0,10-15:0.0088,15-20:0,20-25:0,25及以上:0.0175\",\"trade_again_ratio_active_60d\":\"0.8667\",\"trade_again_ratio_active_30d\":\"0.8000\",\"biz_date\":\"20180314\",\"trade_again_ratio_active_90d\":\"1.0000\",\"zdj_order_amt_90d\":\"1556\",\"zdj_order_amt_30d\":\"3406\",\"zdj_service_amt_30d\":\"3405\",\"zdj_order_amt_60d\":\"1871\",\"zdj_service_amt_7d\":\"154\",\"trade_again_ratio_7d\":\"0.6250\",\"zdj_service_amt_60d\":\"1861\",\"zdj_service_amt_90d\":\"1542\",\"trade_again_ratio_active_7d\":\"0.7273\",\"trade_again_ratio_60d\":\"0.6719\",\"shop_id\":\"2088501624560335-all\",\"partner_industry_type\":\"正餐\",\"trade_again_ratio_90d\":\"0.8125\",\"trade_again_ratio_30d\":\"0.6667\",\"trade_user_cnt_active_60d\":\"30\",\"zdj_order_amt_7d\":\"158\",\"zdj_service_amt_distribution_7d\":\"0-5:0.9733,5-10:0,10-15:0.0133,15-20:0,20-25:0,25及以上:0.0133\",\"trade_user_cnt_active_90d\":\"35\",\"trade_user_cnt_active_7d\":\"11\"}]"    },    "sign": "a5BkRI50LYt3sQWyCS/NQY26DvXybVvmyN5wNwY3eTbYWx2NgjE0J8+/YyCV4jb5vlXJsDeYPYdnRCs7lvxah/sM6yg0aRTlf5c8KtEV5eLIko5sOZqIjRr8+hHISvHMo5/bDn4PfGN8J0csiMe1O/+cMGA8SRqwDWPckZUpmsI="}

注意点: 
1.对于非实时类指标请求业务日期为当天,对应的指标值返回为0【特别需注意】。实时类指标为统计当天的数据指标。 
2.如请求业务日期为当天,返回数据为当天0点至请求时间点的实时数据,可能存在分钟级延时。 
3.提供指定字段排序分页请求功能,每页返回记录数不超过50行。 
4.数据仅存储了2013-01-16之后数据,将查询不到这之前的数据,即使查询返回了,也是不可信任的脏数据。 
5.一次接口调用时最大可获取数据的时间跨期最大不超过90天。 
6.一次性调取的门店数最大可支撑10个。 
7.金额类指标单位为分。 

报错提供信息:appid+接口名+调用接口时间,最好将本次请求的完整参数一并发过来 ! 

如果大家在测试过程中遇到问题欢迎在帖子下方追问哈,请按照标准方式提问

上一篇:equal()和hashcode()方法简析


下一篇:Ribbon 负载均衡调用02——Ribbon 负载均衡演示