提交 cb01541a authored 作者: malei's avatar malei

feat(DataLog): DistrictAnalysis

1.忠诚度 References: N/A
上级 bbbb2314
......@@ -87,6 +87,6 @@ public class DataLogController {
@ApiOperation("忠诚度")
@PostMapping("/visitor/loyalty")
public CallBack<JSONObject> getLoyalty(QueryVisitorLoyaltyForm form) {
return CallBack.success(service.loadLoyalty(form));
return CallBack.success(service.loadLoyaltyPolymerization(form));
}
}
......@@ -593,18 +593,20 @@ public class DataLogServiceImpl extends BaseServiceImpl<DataLog, String> impleme
ch.getKey()
);
JSONObject objBody = null;
try {
byte[] res = HttpUtils.post(BaiduConfig.API_URL, this.generateHttpRequestParam(body), CHARSET);
String s = new String(res);
JSONObject obj = JSON.parseObject(s);
objBody = obj.getJSONObject("body");
JSONObject objBody = obj.getJSONObject("body");
JSONObject ress = objBody.getJSONArray("data").getJSONObject(0).getJSONObject("result");
result.put(ch.getKey(), ress);
} catch (Exception e) {
log.error("获取访客属性失败", e);
}
});
return null;
return result;
}
private String generateHttpRequestParam(BaiduStatisticsBody body) {
......
......@@ -22,7 +22,7 @@ public class QueryVisitorLoyaltyForm {
@ApiModelProperty("游客;全部:all,新游客:new,老访客:old")
private String visitor;
@ApiModelProperty("character_pages:访问页数, character_depth:访问深度, character_time:访问时长, character_lasttime:上次访问时间")
@ApiModelProperty("如果选择调用一次接口返回组装数据,可以忽略该参数;character_pages:访问页数, character_depth:访问深度, character_time:访问时长, character_lasttime:上次访问时间")
private String character;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论